我的编码知识几乎没有,但我一直在使用 Joomla 和预设模板等。但现在我首先撞到了砖墙头。虽然两个横幅(右侧和底部)在台式机和平板电脑上正确显示,但在手机上仅显示底部一个。
这是网站:http : //www.chokladsajten.com
如何让两者都显示在较小的屏幕上?(当然,如果他们也有反应的话,就会有好处。)感谢任何帮助或想法!
自定义.css:
@font-face {
font-family: 'DroidSerifBoldItalic';
src: url('../fonts/DroidSerif-BoldItalic-webfont.eot');
src: url('../fonts/DroidSerif-BoldItalic-webfont.eot?#iefix') format('embedded-opentype'),
url('../fonts/DroidSerif-BoldItalic-webfont.woff') format('woff'),
url('../fonts/DroidSerif-BoldItalic-webfont.ttf') format('truetype'),
url('../fonts/DroidSerif-BoldItalic-webfont.svg#DroidSerifBoldItalic') format('svg');
font-weight: normal;
font-style: normal;
}
/* Logo */
.custom-logo {
width: 104px;
height: 70px;
background-image: url(../../../images/yootheme/logo.png);
background-position: 0 0;
background-repeat: no-repeat;
background-size: contain;
}
/* Only Phones */
@media (max-width: 767px) {
#header-responsive .logo { margin-bottom: 10px; }
}
/* Parallax Effect */
.box-parallax { background-image:
url(../../../images/yootheme/demo/teaser/home_teaser_default.jpg); }
.box-parallax h1 { font-family: "DroidSerifBoldItalic", "TimesNewRoman",
"serif"; }
/* Frontpage Title */
.bigger-title {
margin-top: 0;
margin-bottom: 10px;
font-size: 24px;
line-height: 24px;
}
/* Frontpage List Line */
ul.line.frontpage > li {
margin-top: 30px;
padding-top: 30px;
}
ul.line.frontpage > li:first-child {
margin-top: 0;
padding-top: 0;
}
/* Only Tablets (Portrait) */
@media (min-width: 768px) and (max-width: 959px) {
.frontpage-teaser { height: 280px; }
.frontpage-teaser h2 {
margin-bottom: 0;
line-height: 75px;
font-size: 68px;
}
.frontpage-teaser h4 {
line-height: 28px;
font-size: 23px;
}
}
/* only phones */
@media (max-width: 767px) {
.frontpage-teaser { height: 150px; }
.frontpage-teaser h2 {
margin-top: 10px;
margin-bottom: 0;
line-height: 50px;
font-size: 40px;
}
.frontpage-teaser h4 {
margin-top: 0;
font-size: 12px;
line-height: 16px;
}
}
#banner {
position: absolute;
top: 0;
right: -230px;
}
#footer {
position: center;
bottom: 30px;
}
}
您可以为1220px断点指定自定义样式,如下所示:
@media (max-width: 1220px) {
#banner {
display: block;
position: static;
margin-top: 1.5em;
text-align: center;
}
.bannerItem img {
width: 100%;
height: 150px;
}
}
在您当前的版本中,此断点#banner有一个属性display: none;
,因此一旦窗口的宽度超过 1220 像素,它就会消失
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句