In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article "css how to add style for select" in addition to programmers, most people do not understand, today, in order to make you more understand "css how to add style for select", summed up the following content, with a certain reference value, the detailed steps are clear, the details are handled properly, I hope you can get something through this article, let's take a look at the specific content.
Change the default style of select, and generally use ul,li to simulate it.
Many Jquery plug-ins change the default style of select in this way.
According to the reflection of the program brother, this method could not get the data after the form submitted. Later, after experiments, different JS/Jquery plug-ins were used, and the result was the same: data could not be obtained.
Later, I read a blog written by foreigners, using the style of css to add a div outside the select, setting the width of the select to be less than the width of the parent div, and then changing the style of the default arrow of the select by setting the background property of the div.
This method is a good way, do not write a script, only a simple css to achieve.
However, this method is also flawed, that is, under the IE series, there is a background color block when an option is selected, and IE7-IE10 has this bug.
Under Opera, the background image of setting div is not displayed, that is, the drop-down arrow of select does not show. I don't know what the reason is.
The following code
AAAAAAAAAAA BBBBBBBBBBB CCCCCCCCCCC DDDDDDDDDDD
The code is as follows:
.select _ style {width:240px; height:30px; overflow:hidden; background:url (.. / images/arrow.png) no-repeat 215px; border:1px solid # ccc;-moz-border-radius: 5px; / * Gecko browsers * /-webkit-border-radius: 5px; / * Webkit browsers * / border-radius:5px;} .select _ style select {padding:5px; background:transparent; width:268px; font-size: 16px; border:none; height:30px;-webkit-appearance: none / * for Webkit browsers*/} css selector which css selector can be divided into three categories, namely, id selector, class selector, tag selector. There can be many combinations between them, such as descendant selector, sub-selector, pseudo-class selector, general selector, group selector, and so on.
Thank you for your reading. I hope you have a certain understanding of the key issue of "how to add styles to select by css". The specific usage needs to be understood by hands-on experiments. Try it quickly. If you want to read more articles about relevant knowledge points, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.