html - Wordpress 仅在窄屏幕上读取某些样式

标签 html css wordpress

关于这个问题还有另一个问题,但我会在这里更具体一些,如果我在这里找到正确的解决方案,可能会有助于解决其余问题。

直播链接在这里 http://soloveich.com/pr6/blog/

所以,我有一个日期背景 div。出于某种原因,它只能在窄屏幕上正确显示,而它的样式甚至不会显示在宽屏幕的源代码中。样式在那里。在 wp 管理面板主题编辑器中检查它。

html

<div class="date3">
<div class="datetxt">
<div class="month"><?php the_time('M ') ?></div>
<div class="day"><?php the_time('j ') ?></div>
</div></div>

CSS

.date3 {
width:100px;
height: 100px;
border: 2px solid transparent;
border-radius: 100px;
background-color: #7E7E7E;
color: #fff;
text-align: center;
}


@media screen and (max-width: 530px) {
.date3 {
width:100px;
height: 100px;
border-radius: 60px;
}
}

.month {
text-align: center;
margin-top: 12px;
text-transform: uppercase;
font-size: 24px;
font-weight: 200;
    font-family: 'Exo 2', sans-serif;
}

.day {
text-align: center;
margin-top: -8px;
text-transform: uppercase;
font-size: 40px;
    font-family: 'Exo 2', sans-serif;
}

另外,尝试作弊并设置媒体查询以获得更大的分辨率。没有运气。 附: 所有这一切都是在发布带有文本断路符的 youtube 视频后开始发生的

最佳答案

.date3 的 css 仅存在于媒体查询中,这就是它在低分辨率屏幕上工作的原因。尝试将其置于所有媒体查询之上。应该工作

关于html - Wordpress 仅在窄屏幕上读取某些样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21767465/

相关文章:

html - 媒体查询 "Screen"CSS

用于在中心对齐图像的 CSS

html - 盒子乱七八糟

jquery - 页面 peal z-index 问题?

css - 覆盖 html css 中的跨度并使用 TD

html - 如何在 <object> Embed 上获得 height=100%

javascript - href 中的函数返回 false

css - 如何设置第一个元素显示 : none;?

php - 使用php解析xml文件时出现问题。 URL 地址不包含 .xml 扩展名

html - 如何将元素同时放置在页面底部和其 div 的中心