亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

css浮動學習

original 2019-04-03 13:17:01 189
abstrait:<!DOCTYPE html> <html> <head> <title>css中的浮動</title> <style type="text/css"> li{ list-style: none; /*列表樣式去掉*/ width: 80px;he
<!DOCTYPE html>
<html>
<head>
	<title>css中的浮動</title>
	<style type="text/css">
		li{
			list-style: none;	/*列表樣式去掉*/
			width: 80px;height: 40px;
			background: #ccc;
			line-height: 40px;
			text-align: center;
			margin-left: 2px;
			float: left;
		}
		.clear{clear: both;}	/*也有上下左右之分*/
		.box{
			width: 100px;height: 100px;
			background: red;
			float: right;
			margin: 100px 100px;
		}
	</style>
</head>
<body>
	<!-- 一般兩個塊級元素是向下排列的,用浮動就可以使他們并列在一行;浮動用完后必須消除 -->
	<ul>
		<li>html</li>
		<li>js</li>
		<li>web</li>
		<li>php</li>
	</ul>
	<!-- 上面有用到浮動,那么后面布局就要清除浮動 -->
	<div class="clear"></div>
	<div class="box"></div>
</body>
</html>


Professeur correcteur:查無此人Temps de correction:2019-04-03 13:29:23
Résumé du professeur:完成的不錯。浮動有時候很難控制,要多練習。繼續(xù)加油

Notes de version

Entrées populaires