问下老师这个文字过大导致溢出div容器怎么解决?或者是别的地方有什么问题吗?
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Document</title> <link rel="stylesheet" type="text/css" href="css/css.css"> </head> <body> <!--标题区--> <div class="title"> <div class="tit_text">小蓝条用户数</div> <div class="tit_refresh"></div> </div> <!--banner区--> <div class="banner"> <div class="banner_user">用户数</div> <div class="banner_user_num">1268</div> <div class="banner_last">昨日增加数</div> <div class="banner_last_num">58</div> <div class="banner_today">今日增加数</div> <div class="banner_today_num">10</div> </div> </body> </html>
*{
padding: 0;
margin: 0;
}
body{
font-family: '微软雅黑';
min-width: 750px;
}
.clear:after{
display: block;
content:'';
clear: both;
height:0;
}
/*标题区*/
.title{
width: 750px;
height: 88px;
background-color: #0078d7;
margin: 0 auto;
text-align: center;
position: relative;
}
.title .tit_text{
width: 229px;
height: 37px;
line-height: 37px;
color: #fff;
font-size: 38px;
position: absolute;
top: 50%;
left: 50%;
margin-top: -18.5px;
margin-left: -114.5px;
}
.title .tit_refresh{
width: 44px;
height: 44px;
position: absolute;
top: 50%;
right: 24px;
margin-top: -22px;
background-image:url(../images/refresh.png);
}
/*banner区*/
.banner{
width: 702px;
height: 517px;
margin: 22px auto 0 auto;
border-radius: 22px;
position: relative;
background: -webkit-linear-gradient(left top,#0078d7,#53a9ec);
background: -o-linear-gradient(left top,#0078d7,#53a9ec);
background: -moz-linear-gradient(left top,#0078d7,#53a9ec);
background: -mos-linear-gradient(left top,#0078d7,#53a9ec);
background: linear-gradient(left top,#0078d7,#53a9ec);
}
.banner .banner_user{
width: 146px;
height: 47px;
font-size: 48px;
color: #fff;
font-weight: bolder;
position: absolute;
top: 47px;
left: 56px;
}
.banner .banner_user_num{
width: 422px;
height: 141px;
font-size: 150px;
color: #fff;
font-weight: bolder;
position: absolute;
top: 116px;
left: 219px;
background-color: gray;
}
.banner .banner_last{
width: 181px;
height: 36px;
font-size: 36px;
color: #fff;
font-weight: bolder;
position: absolute;
top: 316px;
left: 52px;
}
.banner .banner_last_num{
width: 114px;
height: 78px;
font-size: 100px;
color: #fff;
font-weight: bolder;
position: absolute;
background-color: gray;
top: 390px;
left: 84px;
}
.banner .banner_today{
width: 183px;
height: 36px;
font-size: 36px;
color: #fff;
font-weight: bolder;
position: absolute;
top: 318px;
left: 468px;
}
.banner .banner_today_num{
width: 114px;
height: 79px;
font-size: 100px;
color: #fff;
font-weight: bolder;
position: absolute;
top: 389px;
left: 508px;
}就是灰色部分是容器,里面的文字出去了,哪里出现的问题
3
收起
正在回答 回答被采纳积分+1
2回答
前端小白入门系列课程
- 参与学习 人
- 提交作业 11218 份
- 解答问题 36712 个
从一个不会编程的小白到一个老司机是需要过程的,首先得入门,学习基础知识,然后才能进阶,最后再到精通,本专题是你走进前端世界的不二选择!
了解课程



恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星