返回CSS样式之浮......登陆

CSS样式之浮动float练习

连界 现代 周伟2019-02-02 20:44:22310

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8">

<title>CSS样式之浮动float</title>

</head>

<style>

li {

width: 100px;

height: 40px;

list-style: none;

background: lightblue;

float: left;

margin-left: 5px;

border-radius: 5px;

text-align: center;

line-height: 40px;

color: #ff6500;

}

.right {

width: 160px;

height: 40px;

background: lightblue;

float: right;

text-align: center;

line-height: 40px;

}

a {

text-decoration: none;

color: green;

margin-right: 10px;

}

</style>

<body>

<div>

<ul>

<li>导航1</li>

<li>导航2</li>

<li>导航3</li>

<li>导航4</li>

</ul>

</div>

<div class="right">

<a href="">登录</a>

<a href="">注册</a>

</div>

</body>

</html>


最新手记推荐

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

全部回复(0)我要回复

暂无评论~
  • 取消回复发送