Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/32.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/75.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 自定义选择框在文本前面有空格_Css_Html_Frontend - Fatal编程技术网

Css 自定义选择框在文本前面有空格

Css 自定义选择框在文本前面有空格,css,html,frontend,Css,Html,Frontend,我创建自定义下拉框。它在文本前有额外的3倍空间(见下图)。该问题仅在windows(Chrome37.0.2062.120)中出现,但在OSX中没有问题 下面是应用于选择标记的样式列表 -webkit-appearance: none; -webkit-background-clip: border-box; -webkit-background-origin: padding-box; -webkit-background-size: auto; -webkit-box-shadow: non

我创建自定义下拉框。它在文本前有额外的3倍空间(见下图)。该问题仅在windows(Chrome37.0.2062.120)中出现,但在OSX中没有问题

下面是应用于选择标记的样式列表

-webkit-appearance: none;
-webkit-background-clip: border-box;
-webkit-background-origin: padding-box;
-webkit-background-size: auto;
-webkit-box-shadow: none;
-webkit-rtl-ordering: logical;
-webkit-transition-delay: 0s, 0s;
-webkit-transition-duration: 0.15s, 0.15s;
-webkit-transition-property: border-color, box-shadow;
-webkit-transition-timing-function: ease-in-out, ease-in-out;
-webkit-writing-mode: horizontal-tb;
align-items: center;
background-attachment: scroll;
background-clip: border-box;
background-color: rgb(255, 255, 255);
background-image: none;
background-origin: padding-box;
background-size: auto;
border-bottom-color: rgb(208, 215, 219);
border-bottom-left-radius: 0px;
border-bottom-right-radius: 0px;
border-bottom-style: solid;
border-bottom-width: 1px;
border-collapse: separate;
border-image-outset: 0px;
border-image-repeat: stretch;
border-image-slice: 100%;
border-image-source: none;
border-image-width: 1;
border-left-color: rgb(208, 215, 219);
border-left-style: solid;
border-left-width: 1px;
border-right-color: rgb(208, 215, 219);
border-right-style: solid;
border-right-width: 1px;
border-top-color: rgb(208, 215, 219);
border-top-left-radius: 0px;
border-top-right-radius: 0px;
border-top-style: solid;
border-top-width: 1px;
box-shadow: none;
box-sizing: border-box;
color: rgb(73, 73, 73);
cursor: default;
display: block;
float: left;
font-family: xxxxx;
font-size: 16px;
font-style: normal;
font-variant: normal;
font-weight: normal;
height: 50px;
letter-spacing: normal;
line-height: 30px;
margin-bottom: 0px;
margin-left: 0px;
margin-right: 0px;
margin-top: 0px;
padding-bottom: 6px;
padding-left: 19px;
padding-right: 5px;
padding-top: 6px;
position: relative;
text-align: start;
text-indent: 0px;
text-shadow: none;
text-transform: none;
transition-delay: 0s, 0s;
transition-duration: 0.15s, 0.15s;
transition-property: border-color, box-shadow;
transition-timing-function: ease-in-out, ease-in-out;
white-space: pre;
width: 210px;
word-spacing: 0px;
writing-mode: lr-tb;
z-index: 2;

-----更新------

我捕获了新的屏幕截图,以指示windows和OS X上的盒子型号,请参见下文

第一个是在windows上。

第二个是在OSX上。


这两个图像应用相同的css。

减少左侧填充:19px;做些小事情并尝试,一定会奏效