我正在使用媒体查询来删除li上的缩进,当屏幕大小为500宽度时,html:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<div class="row" style="margin-left: 2px; margin-right: 1px;">
<div class="media">
<div class="date pull-left">
<p>7<span>June</span></p>
</div>
<div class="media-body">
<p><strong>xxx</strong> xxxx/p>
<p>Key Points:</p>
<ol>
<li>xxx</li>
<li>xxx</li>
<li>xxxx.</li>
<li>sda</li>
<li>dasdaS</li>
<li>ASdaSDa</li>
<li>aSDas.</li>
</ol>
<a href="xxx"><img src="/static/images/YouTube-icon-full_color.gif"></a>
</div>
</div>
</div>
</body>
</html>
和相应的css:
@media (min-width: 600px){
ul{
margin: 0px;
padding: 0px;
}
li{
margin: 0px;
padding: 0px;
}
}
链接到JS bin粘贴 http://jsbin.com/xoqufugo/9/
我的问题是它不起作用。