zoukankan      html  css  js  c++  java
  • css属性content

    content

    <!doctype html>
    <html lang="en">
     <head>
      <meta charset="UTF-8">
      <title>Document</title>
    	<style>
    		/*整个大盒子*/
    		#content{1000px;height:620px;margin:0 auto;}
    		/*小盒子,content内的div,给他浮动*/
    		#content>div{float:left;}
    
    		#content>h1{color: indianred;size: A5;font-style: inherit;}
    
    		#d1{609px;height:377px;margin-bottom:10px;
    			background: aliceblue;
    				margin-right:10px;}
    
    		#d2{381px;height:377px;margin-bottom:10px;
    		background: cornsilk}
    
    		#d3{376px;height:233px;margin-right:10px;background: mediumturquoise}
    
    		#d4,#d5,#d6{198px;height:233px;background: lightpink}
    
    		#d4,#d5{margin-right:10px;background: antiquewhite;}
    	</style>
     </head>
     <body>
    		<div id="content">
    			<div id="d1">1</div>
    			<h1 style="float: bottom">pxpxpxpx</h1>
    			<div id="d2">2</div>
    			<div id="d3">3</div>
    			<div id="d4">4</div>
    			<div id="d5">5</div>
    			<div id="d6">6</div>
    		</div>
     </body>
    </html>
    
    

    #content和#content>div的区别

    content可以理解为一个大盒子

    **是整个这一块**

    content>div是值每一小块,即div中的div

    这样对设置的大布局下,特别改变小处的样式

  • 相关阅读:
    Leetcode Unique Binary Search Trees
    Leetcode Decode Ways
    Leetcode Range Sum Query 2D
    Leetcode Range Sum Query
    Leetcode Swap Nodes in Pairs
    Leetcode Rotate Image
    Leetcode Game of Life
    Leetcode Set Matrix Zeroes
    Leetcode Linked List Cycle II
    CF1321A
  • 原文地址:https://www.cnblogs.com/spacexlxl/p/13712969.html
Copyright © 2011-2022 走看看