Html 手写笔:@媒体屏幕和(最大宽度:425px)阻止手写笔创建css
我刚开始用手写笔编写CSS,我有一个问题 我想根据最大宽度更改CSS。为此,我使用 @介质屏幕和(最大宽度:xyzpx)。这对我来说很正常。 在我的style.styl文件中,我多次使用上述文件,但当我输入最后一个文件时,浏览器只打开普通html文件,而根本不使用.styl文件 这是我的密码:Html 手写笔:@媒体屏幕和(最大宽度:425px)阻止手写笔创建css,html,css,stylus,Html,Css,Stylus,我刚开始用手写笔编写CSS,我有一个问题 我想根据最大宽度更改CSS。为此,我使用 @介质屏幕和(最大宽度:xyzpx)。这对我来说很正常。 在我的style.styl文件中,我多次使用上述文件,但当我输入最后一个文件时,浏览器只打开普通html文件,而根本不使用.styl文件 这是我的密码: @media screen and (max-width: 425px) header height 110px background-image url(/images/banne
@media screen and (max-width: 425px)
header
height 110px
background-image url(/images/banner_425.jpg)
a
&.logo
height 36px
background rgba(0,0,0,.65) url(/images/logo_small.svg) no-repeat center center
background-size 126px 17px
.hero
width 100%
left 0
top 46px
text-align center
h1
font-size 1em
margin-bottom 10px
a
&.btn
padding 2px 30px
font-size .8em
span
display none
您有一个缩进错误
&.logo
height 36px
background rgba(0,0,0,.65) url(/images/logo_small.svg) no-repeat center center
background-size 126px 17px
应该是:
&.logo
height 36px
background rgba(0,0,0,.65) url(/images/logo_small.svg) no-repeat center center
background-size 126px 17px
但总的来说,我强烈建议使用触控笔进行媒体查询谢谢!我不知道我怎么会错过那个错误。谢谢你的提示,我试试看!