Home > Web Front-end > JS Tutorial > Changes to the CSS style of select in HTML_Form special effects

Changes to the CSS style of select in HTML_Form special effects

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-05-16 19:24:39
Original
1232 people have browsed it

I thought it could be easily solved in CSS like input, but I didn’t expect to find out after trying it that the select style cannot be changed by regular CSS. No matter how I do it in CSS, the select style is still the default three-dimensional style. . So I searched on the Internet and found out that this selection cannot be defined in CSS style using conventional methods. It needs to be handled in a special way. I believe that many friends will encounter this problem when dealing with web pages, so I found a good article and forwarded it. I hope it will be helpful to everyone————

First of all, I want to tell you that if you use In the css method, except for the arrow part, everything else can be changed. This is very awkward, because if other styles are changed, the arrow part cannot be changed, which means it is useless.
The following is an example of changing css to select


[Ctrl A Select all Note: If you need to introduce external Js, you need to refresh to execute ]

If you want to make a complete change As for select, one method is to use htc, but its disadvantage is that it does not support other than the ie kernel.
For example, the download address is as follows: Changes to the CSS style of select in HTML_Form special effects Download this file
The second method is to use js, which actually simulates the effect of select. The code is as follows:

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template