簡體   English   中英

如何更改 select 框的下拉面板的樣式,使其具有 chrome 瀏覽器的圓角

[英]How can i change the style of the drop down panel of a select box to have round corners for chrome browser

嗨,我有一個 angular 5 應用程序。 我有一個 select 框,其中包含一些選項列表。我想為在 chrome 中顯示選項的面板提供圓角。 如何使用 css styles 實現這一目標?

請參閱下面的附件。 在此處輸入圖像描述

您可以使用border-radius 設置來做到這一點。

菲:

#rcorners1 {
  border-radius: 25px;
  background: #73AD21;
  padding: 20px; 
  width: 200px;
  height: 150px; 
}

#rcorners2 {
  border-radius: 25px;
  border: 2px solid #73AD21;
  padding: 20px; 
  width: 200px;
  height: 150px; 
}

#rcorners3 {
  border-radius: 25px;
  background: url(paper.gif);
  background-position: left top;
  background-repeat: repeat;
  padding: 20px; 
  width: 200px;
  height: 150px; 
}

我怎樣才能有一個下拉框,您可以在其中選擇一些東西並設置 HTML<title>標簽設置為下拉設置的內容?&lt;/div&gt;</title><div id="text_translate"><p> 這就是我所擁有的,但我不知道如何將它傳遞給 JS 中的變量</p><pre>&lt;select&gt; &lt;option value="1"&gt;1&lt;/option&gt; &lt;option value="2"&gt;2&lt;/option&gt; &lt;option value="3"&gt;3&lt;/option&gt; &lt;option value="4"&gt;4&lt;/option&gt; &lt;/select&gt; &lt;button onclick="myFunction()"&gt;set&lt;/button&gt; &lt;script&gt; function myFunction() { var x = document.title; } &lt;/script&gt;</pre></div>

[英]How can I have a drop down box where you pick something and it sets the HTML <title> tag set to what the drop down is set on?

暫無
暫無

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

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