Yun*_*nan 2 html css firefox google-chrome media-queries
我想为平板电脑设备设置一些CSS规则,为此,我尝试为769px至991px之间的屏幕设置这些规则。当我做 :
@media (min-width: 769px) and (max-width: 991px) {
.img-circle {
width: 50%;
}
}Run Code Online (Sandbox Code Playgroud)
它适用于chrome,但是firefox无法使用,当我尝试添加括号时:
@media ((min-width: 769px) and (max-width: 991px)) {
.img-circle {
width: 50%;
}
}Run Code Online (Sandbox Code Playgroud)
它适用于forefox,但不适用于chrome!如果您有一个主意:)我不知道
问候
使用所有浏览器
.mm {
background: cyan;
width: 200px;
line-height: 200px;
font-weight: 700;
text-align: center;
font-size: 50px;
}
@media only screen and (min-width:768px) and (max-width:990px){
.mm{
background:red;
}
}Run Code Online (Sandbox Code Playgroud)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<div class="mm">12</div>
</body>
</html>Run Code Online (Sandbox Code Playgroud)