Home >Web Front-end >HTML Tutorial >Set padding effect in select element

Set padding effect in select element

WBOY
WBOYOriginal
2016-08-08 08:49:521272browse

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

How to make padding settings take effect on select?

Method 1:

Set attribute appearance:

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

The effect is as follows:

Method 2:

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

The effect is as follows:

Statement:
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