CSS盒子模型

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			#id{
				background: red;
				width: 100px;
				height: auto;
				max-width: 100px;
				min-width: 50px;
				min-height: 50px;
				max-height: 50px;
				padding-left: 20px;
				overflow-y:visible ;
				/* 溢出处理 */
				/* auto浏览器自动处理,有益处加滚动条
				hidden有溢出隐藏掉
				visible溢出显示
				scroll 一直显示滚动条 */
			}
		</style>
	</head>
	<body>
		<div id="id">
			hehe
		</div>
	</body>
</html>

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			div{
				background:red;
				width:100px;
				height:100px;
				visibility: collapse;
				/* 可见性 */
	/* 			visible
				hidden元素不可见但是会占据空间 
				collapse 隐藏表格并且不占据位置
				*/
				
			}
			table tr:first-child{
				visibility: collapse;
				/* display: none; */
				/* block 块级元素
				inline 行内元素
				inline-block 可以设置大小但是在同一行显示
				none 盒子不可见 不占位置 */
				float:left;
				left right 左右浮动
				none 禁用浮动
				/* clear:left清除左浮动
				both none rigth */
				
			}
			
		</style>
	</head>
	<body>
		<div>
			hello
		</div>
		123123
		<table>
			<tr>
				<td>212</td>
				<td>212</td>
			</tr>
			<tr>
				<td>212</td>
				<td>212</td>
			</tr>
		</table>
		
	</body>
</html>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Ranx3

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值