1.CSS 中背景的使用

2.CSS 中列表的使用

15.1 CSS 中背景的使用

属性名称 属性值 说明

background-attachment scroll 设置背景图像会随视窗滚动

条的移动而移动。

fixed 设置背景图像不会随视窗滚动条

的移动而移动。

background-color 十六进制 background-color:#ff0000;

英文名称 background-color:red;

三原色 background-color:rgb(255,0,0)

transparent background-color:transparent;透明

background-image URL background-image:url("bg.jpg")

背景图片

none 不设置背景图片

background-position top left 设置背景图案出现在上左方。

top center 设置背景图案出现在上方中间。

top right 设置背景图案出现在上右方。

center left 设置背景图案出现在中间左方。

center center 设置背景图案出现在IE中间。

center right 设置背景图案出现中间右方。

bottom left 设置背景图案出现在下左方。

bottom 设置背景图案出现在正下方。

bottom right 设置背景图案出现在下右方。

background-repeat repeat 将背景图案填满整个背景。

repeat-x 将背景图案在水平方向添满。

repeat-y 将背景图案在垂直方向添满。

no-repeat 图案只出现一次。

背景图案简化方案:

background:颜色 背景图片 repeat attachment position

15.2 CSS中列表的使用

属性名称 属性值 说明

list-style-type none 无符号

disc 实体的小圆点。

circle 空心的小圆点。

square 实心的小方块。

decimal 1,2,3...

lower-roman i,ii,iii...

upper-roman I,II,III...

lower-alpha a,b,c,d,e...

upper-alpha A,B,C,D,E...

list-style-position inside 清单项目较往右移。

outside 清单项目正常显示。

list-style-image URL list-style-image:url(lmk.gif)

none 不会显示任何图象

清单的简化设置:

list-style:circle inside url("bullet.gif")

CSS 11中背景的使用背景图像会随视窗滚动

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>设置背景图像不会随视窗滚动条
的移动而移动。</title>
<style type="text/css">
body{
background-image:url(images/pic7.jpg);
background-attachment:fixed;
}
</style>
</head> <body>
<p>scroll 设置背景图像不会随视窗滚动条
的移动而移动。</p>
<p>scroll 设置背景图像会随视窗滚动
条的移动而移动。
fixed 设置背景图像不会随视窗滚动条
的移动而移动。</p>
<p>scroll 设置背景图像会随视窗滚动
条的移动而移动。
fixed 设置背景图像不会随视窗滚动条
的移动而移动。</p>
<p>scroll 设置背景图像会随视窗滚动
条的移动而移动。
fixed 设置背景图像不会随视窗滚动条
的移动而移动。</p>
<p>scroll 设置背景图像会随视窗滚动
条的移动而移动。
fixed 设置背景图像不会随视窗滚动条
的移动而移动。</p>
<p>scroll 设置背景图像会随视窗滚动
条的移动而移动。
fixed scroll 设置背景图像会随视窗滚动
条的移动而移动。
fixed 设置背景图像不会随视窗滚动条
的移动而移动。
的移动而移动。</p>
<p>scroll 设置背景图像会随视窗滚动
条的移动而移动。
fixed 设置背景图像不会随视窗滚动条
的移动而移动。</p>
<p>scroll 设置背景图像会随视窗滚动
条的移动而移动。
fixed 设置背景图像不会随视窗滚动条
的移动而移动。</p>
<p>scroll 设置背景图像会随视窗滚动
条的移动而移动。
fixed 设置背景图像不会随视窗滚动条
的移动而移动。</p>
<p>scroll 设置背景图像会随视窗滚动
条的移动而移动。
fixed 设置背景图像不会随视窗滚动条
的移动而移动。</p>
<p>scroll 设置背景图像会随视窗滚动
条的移动而移动。
fixed 设置背景图像不会随视窗滚动条
的移动而移动。</p>
<p>scroll 设置背景图像会随视窗滚动
条的移动而移动。
fixed 设置背景图像不会随视窗滚动条
的移动而移动。</p>
<p>scroll 设置背景图像会随视窗滚动
条的移动而移动。
fixed 设置背景图像不会随视窗滚动条
的移动而移动。</p>
<p>scroll 设置背景图像会随视窗滚动
条的移动而移动。
fixed 设置背景图像不会随视窗滚动条
的移动而移动。</p>
<p>scroll 设置背景图像会随视窗滚动
条的移动而移动。
fixed 设置背景图像不会随视窗滚动条
的移动而移动。</p>
<p>scroll 设置背景图像会随视窗滚动
条的移动而移动。
fixed 设置背景图像不会随视窗滚动条
的移动而移动。</p>
<p>scroll 设置背景图像会随视窗滚动
条的移动而移动。
fixed 设置背景图像不会随视窗滚动条
的移动而移动。</p>
<p>scroll 设置背景图像会随视窗滚动
条的移动而移动。
fixed 设置背景图像不会随视窗滚动条
的移动而移动。</p>
<p>scroll 设置背景图像会随视窗滚动
条的移动而移动。
fixed 设置背景图像不会随视窗滚动条
的移动而移动。</p>
<p>scroll 设置背景图像会随视窗滚动
条的移动而移动。
fixed 设置背景图像不会随视窗滚动条
的移动而移动。</p>
<p>scroll 设置背景图像会随视窗滚动
条的移动而移动。
fixed 设置背景图像不会随视窗滚动条
的移动而移动。</p>
<p>scroll 设置背景图像会随视窗滚动
条的移动而移动。
fixed 设置背景图像不会随视窗滚动条
的移动而移动。</p>
<p>scroll 设置背景图像会随视窗滚动
条的移动而移动。
fixed 设置背景图像不会随视窗滚动条
的移动而移动。</p>
<p>scroll 设置背景图像会随视窗滚动
条的移动而移动。
fixed 设置背景图像不会随视窗滚动条
的移动而移动。</p>
<p>scroll 设置背景图像会随视窗滚动
条的移动而移动。
fixed 设置背景图像不会随视窗滚动条
的移动而移动。</p>
<p>scroll 设置背景图像会随视窗滚动
条的移动而移动。
fixed 设置背景图像不会随视窗滚动条
的移动而移动。</p>
<p>scroll 设置背景图像会随视窗滚动
条的移动而移动。
fixed 设置背景图像不会随视窗滚动条
的移动而移动。</p>
<p>scroll 设置背景图像会随视窗滚动
条的移动而移动。
fixed 设置背景图像不会随视窗滚动条
的移动而移动。</p>
<p>scroll 设置背景图像会随视窗滚动
条的移动而移动。
fixed 设置背景图像不会随视窗滚动条
的移动而移动。</p>
<p>scroll 设置背景图像会随视窗滚动
条的移动而移动。
fixed 设置背景图像不会随视窗滚动条
的移动而移动。</p>
<p>scroll 设置背景图像会随视窗滚动
条的移动而移动。
fixed 设置背景图像不会随视窗滚动条
的移动而移动。</p>
<p>scroll 设置背景图像会随视窗滚动
条的移动而移动。
fixed 设置背景图像不会随视窗滚动条
的移动而移动。</p>
<p>scroll 设置背景图像会随视窗滚动
条的移动而移动。
fixed 设置背景图像不会随视窗滚动条
的移动而移动。</p>
<p>scroll 设置背景图像会随视窗滚动
条的移动而移动。
fixed 设置背景图像不会随视窗滚动条
的移动而移动。</p>
<p>scroll 设置背景图像会随视窗滚动
条的移动而移动。
fixed 设置背景图像不会随视窗滚动条
的移动而移动。</p>
<p>scroll 设置背景图像会随视窗滚动
条的移动而移动。
fixed 设置背景图像不会随视窗滚动条
的移动而移动。</p>
<p>scroll 设置背景图像会随视窗滚动
条的移动而移动。
fixed 设置背景图像不会随视窗滚动条
的移动而移动。</p>
<p>scroll 设置背景图像会随视窗滚动
条的移动而移动。
fixed 设置背景图像不会随视窗滚动条
的移动而移动。</p>
<p>scroll 设置背景图像会随视窗滚动
条的移动而移动。
fixed 设置背景图像不会随视窗滚动条
的移动而移动。</p>
<p>scroll 设置背景图像会随视窗滚动
条的移动而移动。
fixed 设置背景图像不会随视窗滚动条
的移动而移动。</p>
<p>scroll 设置背景图像会随视窗滚动
条的移动而移动。
fixed 设置背景图像不会随视窗滚动条
的移动而移动。</p>
<p>scroll 设置背景图像会随视窗滚动
条的移动而移动。
fixed 设置背景图像不会随视窗滚动条
的移动而移动。</p>
<p>scroll 设置背景图像会随视窗滚动
条的移动而移动。
fixed 设置背景图像不会随视窗滚动条
的移动而移动。</p>
<p>scroll 设置背景图像会随视窗滚动
条的移动而移动。
fixed 设置背景图像不会随视窗滚动条
的移动而移动。</p>
<p>scroll 设置背景图像会随视窗滚动
条的移动而移动。
fixed 设置背景图像不会随视窗滚动条
的移动而移动。</p>
<p>scroll 设置背景图像会随视窗滚动
条的移动而移动。
fixed 设置背景图像不会随视窗滚动条
的移动而移动。</p>
<p>scroll 设置背景图像会随视窗滚动
条的移动而移动。
fixed 设置背景图像不会随视窗滚动条
的移动而移动。</p>
<p>scroll 设置背景图像会随视窗滚动
条的移动而移动。
fixed 设置背景图像不会随视窗滚动条
的移动而移动。</p> </body>
</html>

CSS 12中背景颜色的设置

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>背景颜色的设置</title>
<style type="text/css">
p{
background-image: image()
} </style>
</head> <body>
<P>背景颜色的设置:十六进制</P>
<span>背景颜色的设置:英文名称</span>
<h1>背景颜色的设置:三原色</h1>
<h2>背景颜色的设置:transparent,透明</h2>
</body>
</html>

CSS 13将背景图案只出现一次

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>no-repeat 图案只出现一次</title>
<style type="text/css">
body{
background-image:url(images/pic7.jpg);
background-repeat:no-repeat;
}
</style>
</head> <body>
<P><pre>
background-repeat repeat 将背景图案填满整个背景。
repeat-x 将背景图案在水平方向添满。
repeat-y 将背景图案在垂直方向添满。
no-repeat 图案只出现一次。
</pre></P> </body>
</html>

  CSS 14背景图案出现在上方中间

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>设置背景图案出现在上方中间</title>
<style type="text/css">
body{
background-image:url(images/pic7.jpg);
background-repeat:no-repeat;
background-position: top center;
}
</style>
</head> <body>
<P><pre>
background-position top left 设置背景图案出现在上左方。
top center 设置背景图案出现在上方中间。
top right 设置背景图案出现在上右方。
center left 设置背景图案出现在中间左方。
center center 设置背景图案出现在IE中间。
center right 设置背景图案出现中间右方。
bottom left 设置背景图案出现在下左方。
bottom 设置背景图案出现在正下方。
bottom right 设置背景图案出现在下右方。
背景图案简化方案:
background:颜色 背景图片 repeat attachment position
</pre></P> </body>
</html>

  CSS 15CSS中列表的使用

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>CSS中列表的使用</title>
<style type="text/css">
ul{
list-style-type: decimal;
list-style-position:inside;
}
li{
background:url(images/2.jpg) no-repeat left center;
padding-left:18px;
}
</style>
</head> <body>
<ul>
<li>CSS中列表的使用</li>
<li>CSS中列表的使用</li>
<li>CSS中列表的使用</li>
</ul>
<P><pre>
属性名称 属性值 说明
list-style-type none 无符号
disc 实体的小圆点。
circle 空心的小圆点。
square 实心的小方块。
decimal 1,2,3...
lower-roman i,ii,iii...
upper-roman I,II,III...
lower-alpha a,b,c,d,e...
upper-alpha A,B,C,D,E...
list-style-position inside 清单项目较往右移。
outside 清单项目正常显示。
list-style-image URL list-style-image:url(lmk.gif) 用的比较少,一般用背景图片
none 不会显示任何图象
清单的简化设置:
list-style:circle inside url("bullet.gif")
</pre></P> </body>
</html>

  

15 , CSS 背景与列表的更多相关文章

  1. CSS背景与列表

    CSS中背景的使用 CSS中列表的使用 15.1 CSS中背景的使用         属性名称                             属性值                      ...

  2. CSS速查列表-1-(background)背景

    CSS 背景 CSS 属性定义背景效果: background-color background-image background-repeat background-attachment backg ...

  3. CSS背景图像的简单响应

    本文设有很多,最理想的解决方案,响应图像只是其中之一.我们建议您查看不同的方法,然后再选择一个特定的响应图像解决方案,包括这两个:如何避免重复下载响应图像中选择响应图像解决方案. 大家都在谈论的的sr ...

  4. CSS——背景及应用

    CSS 可以添加背景颜色和背景图片,以及进行图片设置. none : 无背景图(默认的) url : 使用绝对或相对地址指定背景图像 background-image 属性允许指定一个图片展示在背景中 ...

  5. 你不知道的CSS背景—css背景属性全解

    CSS背景在网页设计中使用频率非常高,然而对于这个开发人员很熟悉的CSS属性,却隐藏着许多不为初级开发人员熟知的细节,这篇文章尝试扒开这层不为人知的面纱. 首先列举一下CSS中关于元素背景的所有属性并 ...

  6. 利用wget 抓取 网站网页 包括css背景图片

    利用wget 抓取 网站网页 包括css背景图片 wget是一款非常优秀的http/ftp下载工具,它功能强大,而且几乎所有的unix系统上都有.不过用它来dump比较现代的网站会有一个问题:不支持c ...

  7. CSS——背景渐变

    在线性渐变过程中,颜色沿着一条直线过渡:从左侧到右侧.从右侧到左侧.从顶部到底部.从底部到顶部或着沿任何任意轴.如果你曾使用过制作图件,比如说Photoshop,你对线性渐变并不会陌生. 兼容性问题很 ...

  8. Day4前端学习之路——背景边框列表链接和更复杂的选择器

    课程目标 掌握 CSS 稍微复杂的一些选择器,还有背景,边框等一些 CSS 样式属性 主要内容: 背景属性 边框 列表 链接 其他选择器 选择器概览:https://www.w3school.com. ...

  9. CSS背景background、background-position使用详解

    背景(background)是css中一个重要的的部分,也是需要知道的css的基础知识之一.这篇文章将会涉及css背景(background)的基本用法,包括诸如 background-attachm ...

随机推荐

  1. JAVA设计模式—观察者模式和Reactor反应堆模式

    被观察者(主题)接口 定义主题对象接口 /**抽象主题角色: 这个主题对象在状态上发生变化时,会通知所有观察者对象 也叫事件对象 */ public interface Subject { //增加一 ...

  2. [Swift]LeetCode617. 合并二叉树 | Merge Two Binary Trees

    Given two binary trees and imagine that when you put one of them to cover the other, some nodes of t ...

  3. [Swift]LeetCode860. 柠檬水找零 | Lemonade Change

    At a lemonade stand, each lemonade costs $5. Customers are standing in a queue to buy from you, and ...

  4. [Swift]LeetCode993. 二叉树的堂兄弟节点 | Cousins in Binary Tree

    In a binary tree, the root node is at depth 0, and children of each depth k node are at depth k+1. T ...

  5. setData方法修改data中对象或数组的属性值(小程序开发)

    今日在开发小程序地图的过程中,遇到一个问题,困扰了我一会 业务如下: 困扰点: 我不知道如何修改data中数组包含的对象是如何修改的:期初的想法还是想共享上面的数据,想的太简单了 正确的解决步骤: 直 ...

  6. 3.django Model

    django ORM基本配置 django中遵循 Code Frist 的原则,即:根据代码中定义的类来自动生成数据库表 1.修改project数据库配置 (1)settigs.py里面 默认 DAT ...

  7. 低延时的P2P HLS直播技术实践

    本文根据4月21日OSC源创会·武汉站的现场分享为蓝本,重新整理.以下是演讲内容: 近几年,随着直播.短视频等视频领域对带宽要求的提升以及CDN行业竞争的加剧,很多CDN公司开始往P2P-CDN方向发 ...

  8. 今天俺要说一说装饰着模式(Decorator)

    前言:装饰者模式,又叫做装饰器模式.顾名思义,就是给对象包裹一层,包装.让它变成你喜欢的对象.这种模式在我们开发中经常会用到,它是一种处理问题的技巧,即不让程序死板,也可以扩展程序. (一)何时能用到 ...

  9. C# 《编写高质量代码改善建议》整理&笔记 --(一)基本语言篇

     题记:这是自己的观后感,工作两年了,本来打算好好学习设计模式,或者作为客户端深入了解GPU编程的,但是突然发现还有这么一本书. <编写高质量代码改善建议>,感觉这正是自己需要的. 我是做 ...

  10. APK安装成功后点击"打开",按Home键,在桌面点击图标后应用重启

    转载:http://blog.csdn.net/kepoon/article/details/7468688 问题: 安装系统SD卡里面的apk或者原有的程序更新版本的时候,会遇到升级安装成功之后的一 ...