Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个select动态宽度的下拉菜单。我想在这个下拉列表和右边的图像之间引入一些空间,但使用 CSS 无法做到这一点。
select
jsfiddle:http: //jsfiddle.net/xqruY/1/
只需在图像的 css 中添加 margin-left: (number)px 即可。
例如
margin-left: 50px;
http://jsfiddle.net/xqruY/2/
删除所有位置和顶部,然后...使 css 干净,只使用你需要的东西。
#select { float:left; } #img{ margin-left: 6px; margin-top: 1px; }
http://jsfiddle.net/W8qcN/