簡體   English   中英

打印時選擇標簽中的 CSS 隱藏下拉箭頭

[英]CSS hide drop down arrow in select tag on printing

我的 HTML 代碼放在這里

<select> 
  <option value="mr"> Mr. </option>
  <option value="mrs"> Mrs. </option>
</select>

當我打印頁面時,我不想得到下拉箭頭,如何使用 css 隱藏?

select {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
border: none; /* If you want to remove the border as well */
background: none;
}

在打印上應用上述 css

看你用的是什么瀏覽器...

我還沒有找到 Firefox 的解決方案,但其余的應該完成:

select::-ms-expand {
    display: none;
}
.noarrow{

   overflow: hidden;

}

.noarrow select {
  width: 100px;
  -moz-appearance: none;
  -webkit-appearance: none;
  appearance: none;    
}    

暫無
暫無

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

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