这不起作用:
给定这样的 HTML:
<body>
<div class="list">
<span class=" level">hello</span>
<span class="logic-english">world!</span>
</div>
<div class="list">
<span class=" level">Or should</span>
<span class="logic-english">I say....</span>
</div>
<div class="list">
<span class=" level">something else</span>
<span class="logic-english">such as...</span>
</div>
<div class="list">
<span class=" level">Goodbye</span>
<span class="logic-english">world!</span>
</div>
</body>
一个CSS:
body { width: 100%; }
.list { border: 1px solid #333; margin: 3px; }
.list { font-size: 0.8em; min-width: 50% ; display: inline; }
.list:nth-child(4n+3), .list:nth-child(4n+4) { background: #FFAAAA; width: 100%; }
另外,如何使我的 2 个跨度分别填充其父级宽度的 50%?