課程
/前端開(kāi)發(fā)
/HTML/CSS
/CSS深入理解之border
我就這樣寫為什么不行呢
2017-05-17
源自:CSS深入理解之border 7-1
正在回答
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>border實(shí)現(xiàn)等高布局</title>
<style type="text/css">
.clearfix:before, .clearfix:after{
display: table;
content: " ";
}
.clearfix:after{
clear: both;
h3{
margin: 0;
padding: 0;
border: 0;
font-size: 18px;
.box{
width: 300px;
font: bold 18px/50px "Microsoft YaHei";
border-left: 300px solid #333;
background-color: #eee;
.left{
float: left;
line-height: 50px;
margin-left: -300px;
color: #ccc;
</style>
</head>
<body>
<div class="box clearfix">
<nav class="left">
<h3>導(dǎo)航1</h3>
</nav>
<section>
<div class="module">模塊1</div>
</section>
</div>
</body>
</html>
清楚了浮動(dòng)就可以實(shí)現(xiàn)了,不清楚浮動(dòng)不可以的哦
精神病院院長(zhǎng)的可以,但是要在加一串代碼,這樣左邊有導(dǎo)航右邊沒(méi)有內(nèi)容的時(shí)候也可以等高顯示。
.clear{clear:both;}
<div class="clear"></div>//這個(gè)代碼放在.box的DIV里的最后面
希望對(duì)你們有幫助。
<!doctype html>
<meta charset="utf-8">
<title>border</title>
<style>
border-left:300px solid #222;
.xa{
width:300px;
float:left;
margin-left:-300px;
.module{
line-height:60px;
background:#f00;
<div class="box">
<nav class="xa">
<section class="module">
<div >模塊1</div>
我的也不行啊
少了一條清楚浮動(dòng)
我的也不行,應(yīng)該少了一些插件
舉報(bào)
深入講解border使用方法及應(yīng)用,以及如何借助border完成布局
4 回答為什么不能居右呢,求助~
3 回答為什么寫出來(lái)的顏色不顯示?
1 回答為什么設(shè)置overflow:hidden就只會(huì)有一個(gè)圓了?
1 回答為什么我的出來(lái)是6個(gè)圓?
2 回答border-width為什么不支持百分比?
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號(hào)-11 京公網(wǎng)安備11010802030151號(hào)
購(gòu)課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動(dòng)學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號(hào)
2018-06-01
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>border實(shí)現(xiàn)等高布局</title>
<style type="text/css">
.clearfix:before, .clearfix:after{
display: table;
content: " ";
}
.clearfix:after{
clear: both;
}
h3{
margin: 0;
padding: 0;
border: 0;
font-size: 18px;
}
.box{
width: 300px;
font: bold 18px/50px "Microsoft YaHei";
border-left: 300px solid #333;
background-color: #eee;
}
.left{
float: left;
width: 300px;
line-height: 50px;
margin-left: -300px;
color: #ccc;
}
</style>
</head>
<body>
<div class="box clearfix">
<nav class="left">
<h3>導(dǎo)航1</h3>
</nav>
<section>
<div class="module">模塊1</div>
<div class="module">模塊1</div>
<div class="module">模塊1</div>
</section>
</div>
</body>
</html>
2018-01-12
清楚了浮動(dòng)就可以實(shí)現(xiàn)了,不清楚浮動(dòng)不可以的哦
2017-12-18
精神病院院長(zhǎng)的可以,但是要在加一串代碼,這樣左邊有導(dǎo)航右邊沒(méi)有內(nèi)容的時(shí)候也可以等高顯示。
.clear{clear:both;}
<div class="clear"></div>//這個(gè)代碼放在.box的DIV里的最后面
2017-12-17
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>border</title>
<style>
.box{
border-left:300px solid #222;
}
.xa{
width:300px;
float:left;
margin-left:-300px;
}
.module{
line-height:60px;
background:#f00;
}
</style>
</head>
<body>
<div class="box">
<nav class="xa">
<h3>導(dǎo)航1</h3>
</nav>
<section class="module">
<div >模塊1</div>
</section>
</div>
</body>
</html>
2017-09-19
我的也不行啊
2017-06-27
少了一條清楚浮動(dòng)
2017-05-24
我的也不行,應(yīng)該少了一些插件