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.
这是我的 HTML 表单的一部分:
<form style="background: red; display: inline-block;" method="POST" action="index.php">
display: inline-block样式被正确应用,但不是background: red。
display: inline-block
background: red
为什么是这样?
background:red;应该background-color:red;
background:red;
background-color:red;
使用内部 div:
<form style="padding:0;" method="POST" action="index.php"> <div style="display: inline-block; background-color: red;"> <!-- Stuff here --> </div> </form>
JSFiddle 链接
另外,你用的是什么浏览器?