【发布时间】:2019-09-24 03:50:17
【问题描述】:
这是有问题的网页:
https://www.sunnyenterprises.biz/del/
在浏览器中看起来非常好。我在样式表中设置了以像素为单位的 div 高度。但在手机中,它看起来很奇怪。如何修复我的 CSS 以使其在移动设备中也具有响应性?
另外,移动菜单存在问题,它并没有消失,即使我点击了其中的链接,下拉菜单仍然存在。如果您在移动设备上浏览该网站,则可以看到它。
我已尝试调整 DIV 高度,但无法正确调整。另外,我不知道为什么移动菜单不会消失并粘在上面。
这是我的 CSS 代码。
.subtext {
color:#999999;
font-size:18px;
!important
}
html, body{
margin: 0;
padding: 0;
background: #000D28;
}
.navbar-inverse{
border: none;
background: rgba(1, 32, 96, 0.93);
}
.navbar-inverse .navbar-toggle{
border-color: white;
color: white;
}
.navbar-inverse .navbar-toggle i{
font-size: 20px;
}
.navbar-inverse .navbar-toggle:hover{
background: white;
color: black;
}
.navbar-inverse .navbar-toggle:focus{
background: white;
color: black;
}
.navbar-inverse a{
margin-left: 46px;
}
.navbar-inverse .navbar-brand{
color: white;
transition: color 0.5s;
}
.navbar-inverse .navbar-brand:hover{
color: #F0C12D;
}
.navbar-inverse .navbar-nav>li>a{
color: white;
transition: color 0.5s;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}
.navbar-inverse .navbar-nav>li>a:hover{
color: #F0C12D;
}
.container .iphone{
margin: 0 auto;
margin-top: 50px;
width: 900px;
}
.container .margin-div{
margin-top: 100px;
background: #000D28;
}
.margin-div h1{
color:#F0C12D;
font-size: 60px;
font-weight: 700;
}
.margin-div a{
text-align: center;
}
.margin-div p{
color:white;
font-size: 30px;
}
.margin-div p>a{
font-size: 25px;
margin-left: 10px;
}
.del-rio{
margin-top: 150px;
width: 100%;
height: 950px;
background: #fff;
}
.shamrath{
width: 100%;
height: 950px;
background: #fff;
}
@media only screen and (max-width: 600px) {
shamrath {
height: 400px;
}
}
.container .margin-div-section{
margin-top: 100px;
background: #fff;
}
.margin-div-section h1{
font-size: 60px;
font-weight: 700;
}
.margin-div-section a{
text-align: center;
}
.margin-div-section h2{
color:#333333;
font-size: 30px;
font-weight: 700;
}
.margin-div-section p>a{
font-size: 25px;
margin-left: 10px;
}
.margin-div-section .ipad{
margin: 0 auto;
margin-top: 50px;
width: 700px;
}
.silversand{
width: 100%;
height: 880px;
background: #121117;
}
.concrete{
width: 100%;
height: 500px;
background: #121117;
}
.container .margin-div-section-macbook{
background: #121117;
margin-top: 100px;
}
.margin-div-section-macbook .macbook{
margin: 0 auto;
width: 1500px;
margin-top: 60px;
}
.margin-div-section-macbook h1{
font-size: 60px;
font-weight: 700;
color: white;
}
.margin-div-section-macbook a{
text-align: center;
}
.margin-div-section-macbook p{
font-size: 30px;
color: white
}
.margin-div-section-macbook p>a{
font-size: 25px;
margin-left: 10px;
color: white;
}
.section-shop{
width: 100%;
background: #fff;
padding: 15px 10px;
}
.img-row{
margin-top: 20px;
margin-left: 30px;
}
.carousel-inner {
margin-bottom:-50px;
}
【问题讨论】:
-
不清楚你想要什么?但是尝试调试您的代码,我们无法为您完成。附:没有看到菜单汉堡包的任何问题,我看到您的网站有列。
标签: html css mobile responsive