Html 为什么';我的网站是否在重新调整大小时显示水平滚动条?
这一页是。调整页面大小时,水平滚动条不会出现 CSS:Html 为什么';我的网站是否在重新调整大小时显示水平滚动条?,html,css,resize,Html,Css,Resize,这一页是。调整页面大小时,水平滚动条不会出现 CSS: @charset "utf-8"; /* CSS Document */ html,body,div,span,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,q,s,strong,sub,sup,tt,var,b,u,i,center,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,ar
@charset "utf-8";
/* CSS Document */
html,body,div,span,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,q,s,strong,sub,sup,tt,var,b,u,i,center,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,footer,header,menu,section{border:0;font-size:100%;font:inherit;vertical-align:baseline;margin:0;padding:0}article,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}table{border-collapse:collapse;border-spacing:0}
.clearfix:after {
visibility: hidden; display: block; font-size: 0; content: " "; clear: both; height: 0;
}
* html .clearfix { zoom: 1; } /* IE6 */
*:first-child+html .clearfix { zoom: 1; } /* IE7 */
html{
height:100%;
}
body{
color: white;
font-family: nexa_regular;
margin:0px;
padding:0px;
background:url("../img/fondo.jpg") transparent no-repeat;
-webkit-background-size:cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size:cover;
height:100%;
}
.All{
width:100%;
height:auto;
min-height:100%;
position:relative;
}
.Head{
position:relative;
width: 1001px;
height:120px;
margin: 40px auto 33px;
margin-bottom:0px;
margin-top:.7%;
/*background-color:#00F;*/
}
#Logo{
width:120px;
height:120px;
float:left;
/*background-color:#090;*/
}
#content{
position: relative;
width: 1000px;
margin: 40px auto 33px;
margin-top:.7%;
margin-bottom:10px;
overflow:hidden;
}
#titulo{
position: absolute;
right: 0px;
bottom: 0px;
width: 384px;
height: auto;
font-size:21px;
text-align:right;
color:red;
}
#contbody{
width: 100%;
height: 355px;
position: relative;
overflow:hidden;
font-family:calibri;
}
#cont_slider{
position:relative;
width:100%;
height:355px;
overflow:hidden;
}
/*.somos{
background-image:url(../img/quienessomos/banner_01.jpg);
background-position: 50% 50%;
background-repeat: no-repeat no-repeat;
}*/
#image1{
position:absolute;
background-color:rgba(255,255,255,.7);
top:39px;
left:20px;
width:200px;
height:100px;
z-index:999;
}
#contfoot{
position:relative;
width: 100%;
height: 145px;
padding-bottom:30px;
}
#menu{
width: 100%;
height: 145px;
position: relative;
/*background: url('') transparent center no-repeat;*/
border:none;
}
#socmed{
width: 24px;
height: 58px;
position: absolute;
right: -30px;
bottom: 0px;
/*background: url('') transparent center no-repeat;*/
}
.menuitem{
overflow:hidden;
width: 125px;
height: 145px;
float: left;
cursor: pointer;
}
非常简单,你有一个
溢出:隐藏在.All
属性上设置code><代码>溢出:隐藏代码>将隐藏当前视图之外的任何内容
将您的。所有代码更改为:
.All {
width: 100%;
height: auto;
min-height: 100%;
position: relative;
}
这就是变化:
.All {
width: 100%;
height: auto;
min-height: 100%;
position: relative;
/*overflow: hidden; Remove this */
}
非常简单,你有一个溢出:隐藏在.All
属性上设置code><代码>溢出:隐藏代码>将隐藏当前视图之外的任何内容
将您的。所有代码更改为:
.All {
width: 100%;
height: auto;
min-height: 100%;
position: relative;
}
这就是变化:
.All {
width: 100%;
height: auto;
min-height: 100%;
position: relative;
/*overflow: hidden; Remove this */
}
将css中的minwidth
设置到正文中即可
minwidth
CSS属性用于设置给定元素的最小宽度。它阻止
width
属性的使用值不会变小为指定的值
最小宽度
因此,无论您将最小宽度设置为什么,比如1000px,只要窗口小于1000px,滚动条就会出现
来源:在css中为主体设置一个最小宽度将完成这项工作
minwidth
CSS属性用于设置给定元素的最小宽度。它阻止
width
属性的使用值不会变小为指定的值
最小宽度
因此,无论您将最小宽度设置为什么,比如1000px,只要窗口小于1000px,滚动条就会出现
资料来源:我不想把w3schools作为参考;他们经常犯很多错误。请看原因,并使用类似的替代方法。我理解,我并不是说这个特定的上下文是错误的。我建议你提供一个不同的、更好的来源,因为如果这是特拉维斯或其他人看到的第一个来源,他们可能会很快养成把它作为主要来源的习惯,这对学校来说是不好的。在w3schools开始认真对待准确性(和其他问题)之前,它不应该在这样一个网站上传播,该网站试图作为编码问答的完整参考;他们经常犯很多错误。请看原因,并使用类似的替代方法。我理解,我并不是说这个特定的上下文是错误的。我建议你提供一个不同的、更好的来源,因为如果这是特拉维斯或其他人看到的第一个来源,他们可能会很快养成把它作为主要来源的习惯,这对学校来说是不好的。在w3schools开始认真对待准确性(和其他问题)之前,它不应该在这样一个网站上随意传播,该网站试图作为编写Q&a的完整参考。