返回 css浮动属性...... 登陆

css浮动属性和清除效果

邈看银河系 2019-06-16 01:27:25 241

<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8">

<title>html课程学习-css-浮动属性效果</title>

<link rel="shortcut icon" type="image/X-icon" href="image/logo2.png">

<link rel="stylesheet" type="text/css" href="css/indexp.css">

<style type="text/css">

ul li{list-style: none;width: 100px;height: 40px;line-height: 40px;text-align: center;background-color: #ccc;margin: 0px 1px;float: left;}

div{width: 100px;height: 200px;background-color: red; float: left;}

.clear{clear: both;}

</style>

</head>

<body>

<ul>

<li>首页</li>

<li>学习1</li>

<li>学习2</li>

<li>学习3</li>

<li>学习4</li>

</ul>

<div class="clear"></div>

<div>div1</div>

<div>div2</div>

<div>div3</div>

</body>

</html>


最新手记推荐

• 用composer安装thinkphp框架的步骤 • 省市区接口说明 • 用thinkphp,后台新增栏目 • 管理员添加编辑删除 • 管理员添加编辑删除

全部回复(0)我要回复

暂无评论~
  • 取消 回复 发送
  • PHP中文网