Detailed explanation of how to set padding effect in select element

高洛峰
Release: 2017-03-04 10:32:29
Original
2756 people have browsed it

Add: padding-left: 20px to the select element; but it does not take effect, as shown in the following figure:

Detailed explanation of how to set padding effect in select element

How to make the padding setting take effect on the select?

Method 1:

Set the attribute appearance:

Add attributes to select: appearance: none; -webkit-appearance: none;

The effect is as follows:

Detailed explanation of how to set padding effect in select element

Method 2:

Set the style for select: text-indent: 20px;

The effect is as follows:

Detailed explanation of how to set padding effect in select element

The above method of setting the padding effect in the select element is all the content shared by the editor. I hope it can give you a reference, and I hope you will support the PHP Chinese website.

For more details on how to set padding effects in select elements, please pay attention to the PHP Chinese website for related articles!

Related labels:
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!