第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

怎么用html和css做出色塊

怎么用html和css做出色塊

慕先生4562452 2016-10-04 19:49:44
查看完整描述

1 回答

?
業(yè)余奶茶品鑒師

TA貢獻260條經(jīng)驗 獲得超388個贊

<!DOCTYPE?html>
<html>
????<head>
????????<meta?charset="UTF-8">
????????<title>Test</title>
????????<style>
????????????*{
????????????????margin:?0px;
????????????????padding:?0px;
????????????}
????????????header{
????????????????width:?800px;
????????????????height:?80px;
????????????????background:?#3567AC;
????????????????margin:?0px?auto;
????????????????text-align:?center;
????????????????line-height:?80px;
????????????}
????????????section{
????????????????width:?800px;
????????????????height:?600px;
????????????????margin:?0px?auto;
????????????????text-align:?center;
????????????}
????????????section>div{
????????????????float:?left;
????????????}
????????????section>div:first-child{
????????????????height:?600px;
????????????????width:?150px;
????????????????background:?#E3912B;
????????????}
????????????section>div:nth-child(2){
????????????????height:?600px;
????????????????width:?650px;
????????????}
????????????section>div:nth-child(2)>div:first-child{
????????????????height:?250px;
????????????????width:?650px;
????????????}
????????????section>div:nth-child(2)>div:first-child>div{
????????????????float:?left;
????????????}
????????????section>div:nth-child(2)>div:first-child>div:first-child{
????????????????width:?300px;
????????????????height:?250px;
????????????????background:?#DA4D44;
????????????}
????????????section>div:nth-child(2)>div:first-child>div:nth-child(2){
????????????????width:?350px;
????????????????height:?250px;
????????????????background:?#3DBBD1;
????????????}
????????????section>div:nth-child(2)>div:nth-child(2){
????????????????height:?350px;
????????????????width:?650px;
????????????}
????????????section>div:nth-child(2)>div:nth-child(2)>div{
????????????????float:?left;
????????????}
????????????section>div:nth-child(2)>div:nth-child(2)>div:first-child{
????????????????width:?230px;
????????????????height:?350px;
????????????????background:?#C4D960;
????????????}
????????????section>div:nth-child(2)>div:nth-child(2)>div:nth-child(2){
????????????????width:?190px;
????????????????height:?350px;
????????????????background:?#538FCE;
????????????}
????????????section>div:nth-child(2)>div:nth-child(2)>div:nth-child(3){
????????????????width:?230px;
????????????????height:?350px;
????????????????background:?#EDA948;
????????????}
????????????footer{
????????????????width:?800px;
????????????????height:?80px;
????????????????background:?#578AC1;
????????????????margin:?0px?auto;
????????????????text-align:?center;
????????????????line-height:?80px;
????????????}
????????</style>
????</head>
????<body>
????????<header>
????????????<h1>header</h1>
????????</header>
????????<section>
????????????<div><h1>1</h1></div>
????????????<div>
????????????????<div>
????????????????????<div><h1>2</h1></div>
????????????????????<div><h1>3</h1></div>
????????????????</div>
????????????????<div>
????????????????????<div><h1>4</h1></div>
????????????????????<div><h1>5</h1></div>
????????????????????<div><h1>6</h1></div>
????????????????</div>
????????????</div>
????????</section>
????????<footer>
????????????<h1>footer</h1>
????????</footer>
????</body>
</html>

就是這樣的。望采納

查看完整回答
2 反對 回復 2016-10-04
  • 慕先生4562452
    慕先生4562452
    section&gt;div:nth-child(2){ height: 600px; width: 650px; } section&gt;div:nth-child(2)&gt;div:first-child{ height: 250px; width: 650px; } section&gt;div:nth-child(2)&gt;div:first-child&gt;div{ float: left;
  • 慕先生4562452
    慕先生4562452
    &lt;section&gt; &lt;div&gt;&lt;h1&gt;1&lt;/h1&gt;&lt;/div&gt; &lt;div&gt; &lt;div&gt; &lt;div&gt;&lt;h1&gt;2&lt;/h1&gt;&lt;/div&gt; &lt;div&gt;&lt;h1&gt;3&lt;/h1&gt;&lt;/div&gt; &lt;/div&gt; &lt;div&gt; &lt;div&gt;&lt;h1&gt;4&lt;/h1&gt;&lt;/div&gt; &lt;div&gt;&lt;h1&gt;5&lt;/h1&gt;&lt;/div&gt; &lt;div&gt;&lt;h1&gt;6&lt;/h1&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/section&gt; 這兩段代碼是什么意思?
  • 1 回答
  • 0 關(guān)注
  • 4749 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號