0
我的网站在.aspx页面中显示不同的输出,同时使用相同的结构&在html页面中的CSS它显示正确的输出,但在apsx页面css崩溃。我检查两次代码两次&它是相同的,但输出变得不同。在html和aspx中的CSS结构变化页面
HTML代码
<!--bg-img-container-starts--><div class="bg-img-container">
<!--bg-img-starts--><div class="bg-img">
<!--header-starts--><div class="header">
<!--logo-starts--><div class="logo">
<h2><a title="Quista" href="#">Quista</a></h2>
</div><!--logo-ends-->
<!--menus-starts--><div class="menus">
<ul class="nav">
<li><a href="#">Home</a> <div class="pipe"></div></li>
<li><a href="#">Services</a></li>
<li><a href="#">Pricing</a></li>
<li><a href="#">Track Orders</a></li>
<li><a href="#">About Quista</a></li>
<li class="call"><a href="#">Call Us :- +91 1234 1245</a></li>
</ul>
</div><!--menus-ends-->
</div><!--header-ends-->
</div><!--bg-img-ends-->
CSS
html, body{
margin:0;
padding:0;
width:100%;
height:100%
}
.clear{clear:both}
body{
font-family:'Quicksand', sans-serif;
}
.bg-img-container{
width:100%;
position:relative;
height:100%
}
.bg-img{
width:100%;
max-height:768px;
height:100%;
background:url(../Images/0000.jpg) no-repeat;
background-size:cover;
}
.header{
width:100%;
max-width:1200px;
position:relative;
margin:0 auto;
padding:15px 0 0 0
}
.logo{
width:20%;
display:inline-block;
}
.logo h2{
font-family:'MyriadPro-BoldCondIt';
font-size:4em;
padding:0;
margin:0;
letter-spacing: 5px
}
.logo a{
color:#fff;
text-decoration:none
}
.menus{
width:79%;
display:inline-block;
}
.nav{
marging:0;
padding:0
}
.nav li{
display:inline-block;
list-style:none:none;
}
.nav li a {
padding:15px 25px 15px 25px;
color:#fff;
text-decoration:none;
display:block
}
.nav li a:hover{
border-bottom:2px solid #FFF
}
.call{
background:#df6b5e;
border-radius:50px
}
.call a{
font-weight:bold;
padding:15px 25px 15px 25px !important
}
.call a:hover{
border:none !important
}
我认为问题是与顶格(img- bg-container),因为在css中,我给出了高度100%&它是子div div:height:768px。虽然问题解决,如果我保持最小高度,而不是aspx页面中的最大高度,但如何在代码相同时显示不同的输出。
你确定目录结构仍然是一样的吗?该页面可能无法找到一些资源(图像,样式表...)或者,服务器如何处理路径名称中的大小写不匹配可能存在dfferences –
@MrLister是的所有内容都与aspx页面和html页面相同目录本身&与相同的CSS文件链接。而且我只有在我的问题中提到顶级div时才有问题。在html文件中,潜水高度100%覆盖整个屏幕,并且在aspx页面div高度100%不起作用。 –