html滚动条如何解决

vivic7 2017-07-15 05:33:44

初学者,谢谢谢谢~希望能得到大家的解答。
宽度就是有滚动条,以下是我的css代码
body{
margin:0;

}
#a1{

display: inline-block;
z-index: 999;
}
#a1 span{
color: black;
position: relative;
left: 400px;
font-size: 22px;
}
#a2{

height: 100px;
background-image: url(images/1.jpg);
z-index: 998;

}
#a2 h2{
color: white;
font-size: 60px;
margin: auto;
position: relative;
left: 500px;
line-height: 100px;
font-family: "微软雅黑";
}
#a3 h3{
position: relative;
left: 500px;
font-family: "agency fb";
font-size: 50px;
}
#a4{
display: inline;
width: 500px;
height: 1000px;
position: relative;
left: 30px;
text-align: center;
}
#a4 img{
width: 330px;
height: 200px;
margin: auto;

}
#a4 p{
font-size: 13px;
text-align: center;
}
#a5{
background-image: url(images/1.jpg);
height: 400px;
}
#a5 p{
color: white;
}
#a6{
position: relative;
left: 250px;
}
#a6 img{
width: 200px;
height: 330px;
}
#a6 h6{
font-family: arial;
font-size: 15px;
}
#a6 p{
color: red;
font-size: 10px;
}
#a7{
background-color: gray;
}
#a8{
/*margin: auto;*/
color: white;
background-color: black;

}
#a8 p{
text-align: center;
}

...全文
539 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
Mr_wkw 2017-07-29
  • 打赏
  • 举报
回复
把3个小的div设置display:inline;或者3个小的div设置浮动
Jay_Yoren 2017-07-21
  • 打赏
  • 举报
回复
引用 2 楼 vivic7的回复:
还有一个,如何让图片文字成排表现?
设了一个大的div,大的div有3个小的div,在大的div里设置了display:inline,为什么不起作用,不能排成一排显示?
你把里面的元素都设置成display:block;或者直接用浮动试试~
vivic7 2017-07-15
  • 打赏
  • 举报
回复
还有一个,如何让图片文字成排表现?
设了一个大的div,大的div有3个小的div,在大的div里设置了display:inline,为什么不起作用,不能排成一排显示?
当作看不见 2017-07-15
  • 打赏
  • 举报
回复
body{ overflow-x:hidden; }

61,112

社区成员

发帖
与我相关
我的任务
社区描述
层叠样式表(英文全称:Cascading Style Sheets)是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集)等文件样式的计算机语言。
社区管理员
  • HTML(CSS)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧