设置<a>元素的背景图像
来源:互联网 发布:mp4相册制作软件 编辑:程序博客网 时间:2024/06/13 13:41
基本用法示例:
background:#00FF00 url(bgimage.gif) no-repeat fixed top;}
属性说明:
background:背景色 背景图像 背景图像是否及如何重复 背景图像是否固定或者随着页面的其余部分滚动 背景图像的起始位置
背景色
color-name
color-rgb
color-hex
transparent
背景图像
url(URL)
none
背景图像是否及如何重复
repeat
repeat-x
repeat-y
no-repeat
背景图像是否固定或者随着页面的其余部分滚动
scroll
fixed
背景图像的起始位置
top left
top center
top right
center left
center center
center right
bottom left
bottom center
bottom right
x% y%
background:#00FF00 url(bgimage.gif) no-repeat fixed top;}
属性说明:
background:背景色 背景图像 背景图像是否及如何重复 背景图像是否固定或者随着页面的其余部分滚动 背景图像的起始位置
背景色
color-name
color-rgb
color-hex
transparent
背景图像
url(URL)
none
背景图像是否及如何重复
repeat
repeat-x
repeat-y
no-repeat
背景图像是否固定或者随着页面的其余部分滚动
scroll
fixed
背景图像的起始位置
top left
top center
top right
center left
center center
center right
bottom left
bottom center
bottom right
x% y%
xpos ypos
在dreamwear中设置如下:
实际应用
给<a>元素设置背景图像
背景图像为
制作圆点指示器,平时背景为下方的圆点,当鼠标悬停时,背景为上方的圆点
/*设置圆点的样式*//*主要是把<a>元素变成块状,背景图像高度为32px,有上下2个圆点,所以只取一半,另一半隐藏,-16px表示取下面的圆点*/.flex-control-paging li a {background: url(images/dot.png) no-repeat 0 -16px;display: block;height: 16px;overflow: hidden;text-indent: -99em;width: 16px;cursor: pointer;}/*当鼠标悬停在圆点上时,取上面的圆点*/.flex-control-paging li a.flex-active,.flex-control-paging li.active a {background-position: 0 0;}
0 0
- 设置<a>元素的背景图像
- Flex4的Application中设置背景图像
- 为什么设置的背景图像不显示?
- 设置背景图像平铺
- 设置背景图像平铺
- 设置背景图像平铺
- 设置背景图像平铺
- html设置背景图像
- css的背景图像设置设置列表的项目符号
- 为什么建议设置背景图像的同时还设置背景颜色?
- 设置背景避免图像拉伸
- CSS设置元素背景透明,其内的文字不透明
- background-position 属性设置背景图像的起始位置
- 图像处理的背景
- css 设置元素背景为透明
- css 设置元素背景为透明
- CSS(六) 设置背景颜色和背景图像
- CSS3 背景图像的位置
- 选择器
- 开源Math.NET基础数学类库使用(06)直接求解线性方程组
- 核心板产品
- 事件
- UIKit Dynamics动力系统入门
- 设置<a>元素的背景图像
- 动画
- scoped_array
- Ajax
- 《剑指offer》把字符串转换成整数
- 高性能的通讯库-zeroMQ的几个高性能特征
- NYOJ - 143 第几是谁? & NYOJ - 149 我排第几个
- Web本地存储 - localStorage
- LeetCode|Kth Largest Element in an Array