簡體   English   中英

如何使Tapestry的BeanEditor水平放置?

[英]How to make Tapestry's BeanEditor horizontal?

在Tapestry 5.3中,BeanEditor以垂直形式出現,如下所示:

╔════════════════════════════════════╗
║           Label1  Value1           ║
║           Label2  Value2           ║
║           Label3  Value3           ║
║           Label4  Value4           ║
╚════════════════════════════════════╝

是否存在像這樣的屬性或其他可能使其變為水平的狀態?

╔══════════════════════════════════════════════════════════════════╗
║ Label1 Value1 | Label2  Value2 | Label3  Value3 | Label4  Value4 ║
╚══════════════════════════════════════════════════════════════════╝

您可以通過添加一些自定義CSS來實現。 Tapestry使用好的類名來定位所有元素。 只需添加一些具有更高特異性的 CSS即可覆蓋掛毯的默認設置。

以下將給您您想要的結果。 為了使其完全符合您的喜好,您必須對其進行一些操作(顏色,寬度等),但這將為您確定布局。

body DIV.t-beaneditor-row {
    float: left;
    width: 300px;
}

body DIV.t-beaneditor-row LABEL {
    width: 100px;
}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM