最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
CSS 控制图像不透明/透明度
时间:2008-11-05 编辑:简简单单 来源:一聚教程网
CSS Image Opacity / Transparency
注:这是没有一个CSS标准。然而,工程所有的现代浏览器,是一种部分的W3C的CSS 3的建议。
范例1 -创建一个透明图像
首先,我们将向您展示如何创建一个透明图像的CSS 。
经常图片:
例如2 -图像透明度-鼠标放置的影响
我们看到,第一行的源代码是类似的源代码范例1 。此外,我们还增加了一个onmouseover属性和onmouseout属性。
onmouseover属性的定义会发生什么事时,鼠标指针移动的形象。在这种情况下,我们要的形象不能是透明的当我们移动鼠标指针超过它。
的语法这在Firefox是: this.style.opacity = 1和IE中的语法是: this.filters.alpha.opacity = 100 。
当鼠标指针远离的形象,我们希望的形象是透明的一次。这样做是在onmouseout属性。This is some text that is placed in the transparent box. This is some text that is placed in the transparent box. This is some text that is placed in the transparent box. This is some text that is placed in the transparent box. This is some text that is placed in the transparent box.
-
上一个: CSS Margin 教程
相关文章
- CSS 鼠标点击拖拽效果代码展示 10-31
- CSS使用SVG实现动态分布的圆环发散路径动画教程 10-31
- CSS组合选择器解析 10-26
- css带搜索导航栏的代码展示 10-26
- css复合选择器的具体使用方法介绍 10-26
- css三列自适应布局教程 10-26
热门栏目
-
php教程
php入门 php安全 php安装 php常用代码 php高级应用 -
asp.net教程
基础入门 .Net开发 C语言 VB.Net语言 WebService -
手机开发
安卓教程 ios7教程 Windows Phone Windows Mobile 手机常见问题 -
css教程
CSS入门 常用代码 经典案例 样式布局 高级应用 -
网页制作
设计基础 Dreamweaver Frontpage js教程 XNL/XSLT -
办公数码
word excel powerpoint 金山WPS 电脑新手 -
jsp教程
Application与Applet J2EE/EJB/服务器 J2ME开发 Java基础 Java技巧及代码