我正在建立一个新的网站,我想在移动设备上缩小我的标题。我用@media (max-width: 960px)
尝试过,但那没用。
我正在使用的网站是https://www.picture-it-in.org,标题可以在“关于”页面(https://www.picture-it-in.org/about)上看到。
我正在使用LeadEngine WordPress主题,并且已经安装了一个子主题。
@media (max-width: 960px) {
#wrapper > header > div > .entry-header .section-heading{
padding-top: 29px !important;
padding-bottom: 29px !important;
}
}
<div id="wrapper" class=" ">
<header class="entry-header single-page-header ">
<div class="row single-page-heading blog-title-left ">
<div class="container">
<h1 class="section-heading">Pictures</h1>
</div>
</div>
</header>
</div>
我希望代码能够在移动设备上缩小标题,但在进行调整后没有任何区别。
看起来您的目标是错误的div,而您的媒体查询错误。这可能是你想要的?
@media (max-width: 960px){
header.entry-header.single-page-header {
padding-top: 29px;
padding-bottom: 29px;
}
}