1. 列表图片
  2. 背景列表
  3. 翻转列表
  4. 水平导航
    1. 内边距与外边距

      Ul {

      List-style-type:none;

      Margin: 0;

      Padding: 0;

      }

    1. 使用图片作为列表图标

      Ul {

      Margin: 0;

      Padding:0;

      Width: 200px;

      List-style-image:url(images/list.gif);

      Line-height: 150%;

      }

    1. 以背景图片作为项目列表图标

      Ul {

      List-style-type:none;

      }

      Li {

      Background: url(images/list.gif) no-repeat left center;

      Padding: 0 0 0 25px;

      }

    1. 内联列表

      Ul {

      List-style-type:disc;

      }

      Li {

      Display: inline;

      }

      这里的display属性是块级值的设置,定义是否要成为块.

      Inline是内联,block是区块.

    5. 背景图片和内联列表

    Ul {

    List-style-type: none;

    }

    Li {

    Display:inline;

    Background:url(images/list.gif) no-repeat left center;

    Margin: 0 0 0 10px;

    Padding: 0 0 0 15px;

    }

    6.垂直导航栏

    <div>

    <ul>

    <li><a href="#">Drubjs Menu</a></li>

    <li><a href="#">Beer</a></li>

    <li><a href="#">Spirits</a></li>

    <li><a href="#">Cola</a></li>

    <li><a href="#">Lemonade</a></li>

    <li><a href="#">Tea</a></li>

    <li><a href="#">Coffee</a></li>

    </ul>

    </div>

    Ul {

    List-style-type:none;

    Margin:5px;

    Padding:2px

    Width: 160px;

    Font-size: 12px;

    }

    Li {

    Background: #ddd;

    Margin: 0;

    Padding: 2px 10px;

    Border-left: 1px solid #fff;

    Border-top: 1px solid #fff;

    Border-right: 1px solid #666;

    Border-bottom: 1px solid #aaa;

    }

    7.创建垂直翻转的列表

    ul {

    margin: 0;

    padding: 0;

    list-style-type: none;

    }

    Ul a{

    Display: block;

    Width: 200px;

    Height: 40px; /*39px*/

    Line-height: 40px; /*39px*/

    Color:#000;

    Text-decoration: none;

    Background: #94b8E9 url(images/pixy-rollover.gif) no-repeat left center; /*left bottom*/

    Text-indent: 50px;

    }

    a:hover {

    background-position: right bottom;

    }

    8.创建水平导航条

    ul {

    Margin: 0;

    Padding: 0 2em;

    List-style: none;

    line-height: 2.1em;

    Width: 720px;

    Background: #faa819 url(images/mainNavBg.gif) repeat-x;

    }

    ul li {

    float: left;

    }

    ul a {

    color:#fff;

    padding: 0 10px;

    background: url(images/divider.gif) repeat-y left top;

    /* background: url(images/divider.gif) no-repeat right center;

    text-align:center;

    */

    text-decoration: none;

    }

CSS构造列表的更多相关文章

  1. 23 , CSS 构造列表与导航

    1. 列表图片 2. 背景列表 3. 翻转列表 4. 水平导航 1. 内边距与外边距 Ul { Margin: 0; Padding: 0; } 2. 使用图片作为列表图标 Ul { Margin: ...

  2. 一个带标号的CSS文章列表写法

    <title>CSS文章列表</title> <style type="text/css"> *{margin:0;padding:0;list ...

  3. CSS图片列表

    1.效果图: 2.Example Source Code <h3><a href="http://www.52css.com/">我爱CSS画廊</a ...

  4. css构造块级元素

    css 1. 宽高width:数值;height:数值;也可用百分比!长高的设置不会被后代继承2. 背景(1)背景颜色background-color:颜色值;元素的背景颜色默认为transparen ...

  5. css构造文本

    1. 1. 文本缩进text-indent:值:值为数字,最常用的数值单位是px(像素),也可以直接是百分比!text-indent:100px;text-indent:10%;2. 文本对齐text ...

  6. 24, CSS 构造超链接

    1. 超链接边框 2. 派生超链接 3. 属性选择器超链接 4. 动态超链接 5. 图像翻转超链接 6. CSS 工具提示 1.给链接加上边框 A:link { Color: #f00; Text-d ...

  7. CSS控制列表样式属性list-style有哪些?怎么用?

    CSS列表样式属性list-style有哪些类型?不同类型CSS控制列表样式使用时该注意什么? 这是W3Cschool用户Shirley于2016-11-10在W3Cschool编程问答提出的问题.云 ...

  8. 常用的CSS属性列表汇总

    常用的CSS属性列表汇总 近期教学给学员总结常用的CSS属性,方便学习查询,正好发上来也给大家分享一下. 表格最右列的数字标识支持的CSS最低版本. 01. CSS背景属性(Background) 属 ...

  9. 学习笔记 第八章 使用CSS美化列表

    第8章  使用CSS美化列表 8.1 列表的基本结构 在HTML中,列表结构可以分为两种基本类型:有序列表和无序列表.使用标签如下: <ul>...</ul>:标识无序列表: ...

随机推荐

  1. C# 实现对接电信交费易自动缴费

    他有这样一个JS PassGuardCtrl.js 部分代码    1 defaults:{  2             obj:null,  3             random:null,/ ...

  2. UVa 11489 (博弈) Integer Game

    一个数字能被3整除就等价于这个数的各个数字之和被3整除. 所以一开始的时候先要拿一个能使剩下的数字是3的倍数的数. 然后就一直拿0.3.6.9直到某人不能再拿为止. #include <cstd ...

  3. ios9下ionic框架报[$rootScope:infdig] 10 $digest() iterations reached. Aborting!的解决办法

    升级ios9后,ionic开发的app会报[$rootScope:infdig] 10 $digest() iterations reached. Aborting!的错误,加上一个patch就可以解 ...

  4. Table '.\mysql\proc' is marked as crashed and should be repaired 报错

    Table '.\mysql\proc' is marked as crashed and should be repaired 报错 解决方法: 找到mysql的安装目录的bin/myisamchk ...

  5. SpringMVC——实现拦截器

    1. SpringMVC拦截器的概念与Struts2相同 2. 实现拦截器 (1) 项目结构 (2) 实现HandlerInterceptor接口 package com.zhengbin.contr ...

  6. 在delphi中, reintroduce作用

    在delphi中, reintroduce作用 当在子类中重载或者重新声明父类的虚方法时,使用     reintroduce   关键字告知编译器,可以消除警告信息.如:          TPar ...

  7. Top Android App使用的组件 3

    8684公交 AdChina:com.adchina:易传媒广告平台 AdsMogo:com.adsmogo:芒果移动广告平台 大姨吗 AChartEngine:org.achartengine:An ...

  8. wifi详解(五)

    1        Android平台的Wifi模块移植要点 1.1      Wifi结构 user interface Android WiFiService WPA_Supplicant DHD ...

  9. [Everyday Mathematics]20150203

    设 $f$ 在 $\bbR$ 上连续可导, 且 $\dps{f'\sex{\frac{1}{2}}=0}$. 试证: $$\bex \exists\ \xi\in \sex{0,\frac{1}{2} ...

  10. ylbtech-SubwayNav(地铁线路导航)-数据库设计

    ylbtech-DatabaseDesgin:ylbtech-SubwayNav(地铁线路导航)-数据库设计 DatabaseName:SubwayNav(地铁线路导航) Type:线路导航 1.A, ...