[英]Positioning the contents of a dojo dijit.form.DropDownButton?
[英]How to remove down arrow icon in dijit.form.dropDownButton?
我在我的應用程序中使用dijit.form.dropDownbutton。 但是,我想刪除下拉按鈕中的向下箭頭圖標。 有辦法嗎?
首先,不要這樣做。 它就在那里,因為各種可用性約定 - 用戶期望的東西。 它將它們指向熟悉的功能,其中向下箭頭圖標表示下拉框。
其次,如果你選擇忽略第一個建議,你可以繼續這樣做。 按鈕由(在claro主題的情況下)控制:
.claro .dijitArrowButtonInner {
width: 15px;
height: 15px;
margin: 0 auto;
background-image: url(form/images/buttonArrows.png);
background-repeat: no-repeat;
background-position: -51px 53%;
}
覆蓋它並添加: display: none;
刪除箭頭並重新調整按鈕的大小。 例如,您可以通過為div
分配一個額外的類yourclass
並構建一個並行的CSS層次結構來覆蓋它:
.claro .yourclass .dijitArrowButtonInner {
display: none !important;
}
所以在你的<head>
部分你有:
<style>
.claro .yourclass .dijitArrowButtonInner {
display: none !important;
}
</style>
然后:
<body class=" claro ">
...
<div id="dropdownButtonContainer" class="yourclass"></div>
...
如果有一種比這更簡單的編程方式 - 我不知道它。
編輯也作為一個友好的建議,你應該嘗試接受你的問題的答案,否則在某些時候沒有人會回答你。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.