注意:ul中自带padding值,需要清除。

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css">
body,ul,li{
margin: 0;
padding: 0;
}
ul,li{
list-style: none;
}
ul{
background-color: #fff;
height: 279px;
width: 210px;
margin-left: 10px;
padding: 0 15px;
}
li{
height: 30px;
border-bottom: 1px dashed #666;
line-height: 30px;
background: url("tb.gif") no-repeat left center;
padding-left: 16px; }
li a{
text-decoration: none;
}
.box{
width: 260px;
height: 327px;
border: 1px solid #009900;
margin: 10px auto;
background: url("bg.gif");
}
.box .title{
height: 23px;
margin:10px 0 5px 10px ;
border-left: 4px solid #C9E143;
font: 16px/23px 微软雅黑;
color: #fff;
padding-left: 11px; }
</style>
</head>
<body>
<div class="box">
<div class="title">爱宠知识</div>
<ul>
<li><a href="#">养狗比养猫更健康</a></li>
<li><a href="#">养狗比养猫更健康</a></li>
<li><a href="#">养狗比养猫更健康</a></li>
<li><a href="#">养狗比养猫更健康</a></li>
<li><a href="#">养狗比养猫更健康</a></li>
<li><a href="#">养狗比养猫更健康</a></li>
<li><a href="#">养狗比养猫更健康</a></li>
<li><a href="#">养狗比养猫更健康</a></li>
<li><a href="#">养狗比养猫更健康</a></li>
</ul>
</div>
</body>
</html>

效果:

最新文章

  1. Ember.js入门教程、博文汇总
  2. Ubuntu NFSserver 简易安装及使用
  3. 即将翻译 Building The New Financial Times Web App
  4. 反向代理在Web渗透测试中的运用
  5. 云时代基础设置自动化管理利器: Chef
  6. likwid工具尝鲜
  7. Linux 浅谈Linux 操作系统的安全设置
  8. windows 下一个 easy_install 设备
  9. MM32 RTC学习(兼容STM32)
  10. 谷歌浏览器訪问不了啦,oh shit!
  11. 在PHP语言中使用JSON
  12. 【待整理】MySQL alter table modify vs alter table add产生state不一样
  13. OpenFlow Flow-Mod消息学习
  14. Expression
  15. vue图片onerror加载路径写法
  16. .tar.xz文件的解压方法
  17. Kaggle初学者五步入门指南,七大诀窍助你享受竞赛
  18. Spring Boot中JSON参数传递,后台实体接受问题
  19. 设置DataGridView中表头颜色
  20. Postgresql_根据执行计划优化SQL

热门文章

  1. 如何高效读写百万级的Excel?
  2. V Server Ubuntu
  3. [React Native] Prevent the On-screen Keyboard from Covering up Text Inputs
  4. Spring Web Flow 入门demo(二)与业务结合 附源代码
  5. Linux经常使用命令002之搜索命令locate、whereis、which、find、grep
  6. DetachedCriteria的使用
  7. java中commons-beanutils的介绍
  8. c#复制文件、文件夹代码
  9. Android 淘宝搜索记录分析及千牛数据库名称关联
  10. ios5--计算器