我无法弄清楚我在做什么错...在“ sliderbox”中有两张图片,我需要其中一张才能在移动设备和小型设备上消失。我正在尝试创建一个新类,然后隐藏该类,但是没有任何反应。提前致谢!

资源:

<section class="sliderbox" id="menu-homepage">
    <img src="img/arrow.png" class="arrow" alt="image" width="300" height="85"    align="right">


媒体查询:

@media handheld, only screen and (max-width: 980px) {
    .theme-default .nivo-caption{
    font-size: 21px;
    }

    .theme-default .nivoSlider{
    height: inherit;
    }
.sliderbox-class-arrow {
    display: none;
}


直播@ gradepowerbrandon.com/test

最佳答案

那是因为您做错了。

这应该是这样的:

.sliderbox img.arrow {
    display: none;


您不得写“班级”一词。只是名字。

关于html - 针对特定图像的媒体查询,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/22224249/

10-12 13:13