html - Wordpress CSS 和媒体查询
问题描述
我正在使用 Wordpress 主题并在更改小于 961px 屏幕尺寸的标签/移动视图的@media 查询时面临一些挑战。以下是链接:
http://www.logopexcil.com在更高的分辨率上,标题背景图像从最顶部开始,但低于 961px 的分辨率,它在顶部栏和导航栏之后开始。我尝试使用以下 CSS,但似乎我做错了什么:
@media (max-width: 961px) {
.has-header-type11 .blox.page-title-x,.parallax-sec
.page-title-x, .has-header-type11 .video-sec .page-title-x {
top:0!important;
}
}
解决方案
根据您的描述,我了解到您需要对齐方面的帮助。这个 CSS 调整容器和标题,因为它们必须颠倒。希望能帮助到你。
@media (max-width: 961px) {
.has-header-type11 .blox.page-title-x,
.parallax-sec
.page-title-x,
.has-header-type11 .video-sec .page-title-x {top:0!important;}
.top-bar {display: none;} /* this was taking up space */
.container {position:relative;top: 70px;} /* in the HTML this is above header, so bump it down */
#header.w-header-type-11 {position: relative !important;top: -155px;}
#main-content.container {padding:0;} /* remove unneeded padding */
}
推荐阅读
- elasticsearch - 在 Elasticsearch 中删除文档不起作用
- docker - 如何在浏览器中访问 Docker Selenium hub 控制台?
- java - 在 Rest API 中找不到处理资源
- postgresql - 有什么方法可以在不退出编辑器的情况下将 postgresql 中外部编辑器的内容传输到查询缓冲区?
- jenkins - 詹金斯代理安全
- python - Dataframe中多行的条件累积和
- docker - Docker:容器应该可以访问另一个容器的目录
- sql-server - 运行时 SSIS 变量表达式求值 异常行为
- javascript - 如何返回开始处理 jQuery
- python - 当每个项目也包含在另一个元组中时如何从元组列表中获取第一个项目