css3のtext-shadow
text-shadow,让我们大家一起来学习一下吧。
语法:
text-shadow:none | <shadow> [ , <shadow> ]*
<shadow> = <length>{2,3} && <color>?
默认值:none;
适用于:所有元素
继承性:有
取值:
none:无阴影
<length>①:第1个长度值用来设置对象的阴影水平偏移值。可以为负值
<length>②:第2个长度值用来设置对象的阴影垂直偏移值。可以为负值
<length>③:如果提供了第3个长度值则用来设置对象的阴影模糊值。不允许负值
<color>:设置对象的阴影的颜色,可以是rgba透明色。
说明:
可以设定多组效果,每组参数以逗号分隔。
兼容性:
示例:
<!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>
* {
margin: 0;
padding: 0;
}
body {
font-family: Verdana, Geneva, Sans-serif;
}
div {
margin-bottom: 10px;
}
/*基本阴影*/
.exg_1 {
font-size:5em;
text-shadow: 2px 4px 3px rgba(0,0,0,0.3);
color:#FFF;
text-align:center;
background: #0ff;
}
/*深陷凸显*/
.exg_2 {
font-size: 5em;
color: rgba(0,0,0,0.6);
text-shadow: 2px 2px 3px rgba(255,255,255,0.1);
text-align:center;
background: #222;
}
/*硬边的阴影*/
.exg_3 {
font-size: 5em;
color: #fff;
text-shadow:6px 6px 0px rgba(0,0,0,0.2);
text-align: center;
background: #fff3cd; }
/*双层阴影*/
.exg_4 {
font-size: 5em;
color: #000;
text-shadow:4px 3px 0px #fff, 9px 8px 0px rgba(0,0,0,0.15);
text-align: center;
}
/*有一定距离的阴影*/
.exg_5 {
font-size: 5em;
color: #fff;
text-shadow:0px 3px 0px #b2a98f,
0px 14px 10px rgba(0,0,0,0.15),
0px 24px 2px rgba(0,0,0,0.1),
0px 34px 30px rgba(0,0,0,0.1);
text-align: center;
background: #fff3cd;
}
/*密切结合并有阴影*/
.exg_6 {
font-size: 5em;
color: #fff;
text-shadow:0px 4px 3px rgba(0,0,0,0.4),
0px 8px 13px rgba(0,0,0,0.1),
0px 18px 23px rgba(0,0,0,0.1);
text-align: center;
background: #6bf9fb;
}
/*立体3D文字*/
.exg_7 {
font-size: 5em;
color: #fff;
text-shadow:0 1px 0 #ccc,
0 2px 0 #c9c9c9,
0 3px 0 #bbb,
0 4px 0 #b9b9b9;
text-align: center;
background: #3594c0;
}
/*嵌入式文字(仅支持谷歌)*/
.exg_8 {
font-size: 5em;
color: #fff;
background: #dbdbdb;
}
.exg_8 h1 {
background: #666;
-webkit-background-clip:text;
-moz-background-clip:text;
background-clip: text;
color: transparent;
text-shadow: rgba(255,255,255,0.1) 0px 3px 3px;
text-align: center;
}
/*四周发光的文字*/
.exg_9 {
background: #992d23;
font-size: 5em;
color: #fff;
text-shadow:0px 0px 9px rgba(255,255,255,0.7);
text-align: center;
}
/*层叠文字*/
.exg_10 {
background: #6bf9fb;
font-size: 5em;
color: #fff;
text-shadow: -10px 10px 0px #00e6e6,
-20px 20px 0px #01cccc,
-30px 30px 0px #00bdbd;
text-align: center;
padding-bottom: 0.5em;
}
/*多处光源投射*/
.exg_11 {
font-size: 5em;
color: #fff;
text-shadow: 0px 15px 5px rgba(0,0,0,0.1),
10px 20px 5px rgba(0,0,0,0.05),
-10px 20px 5px rgba(0,0,0,0.05);
text-align: center;
background: #6bf9fb;
padding-bottom: 0.2em;
}
/*浮雕效果*/
.exg_12 {
font-size: 5em;
color: rgba(0,0,0,0.6);
text-shadow:2px 8px 6px rgba(0,0,0,0.2),
0px -5px 35px rgba(255,255,255,0.3);
text-align: center;
background: #609350;
} </style>
</head> <body>
<div class="exg_1">
<h1>marker</h1>
</div>
<div class="exg_2">
<h1>marker</h1>
</div>
<div class="exg_3">
<h1>marker</h1>
</div>
<div class="exg_4">
<h1>marker</h1>
</div>
<div class="exg_5">
<h1>marker</h1>
</div>
<div class="exg_6">
<h1>marker</h1>
</div>
<div class="exg_7">
<h1>marker</h1>
</div>
<div class="exg_8">
<h1>marker</h1>
</div>
<div class="exg_9">
<h1>marker</h1>
</div>
<div class="exg_10">
<h1>marker</h1>
</div>
<div class="exg_11">
<h1>marker</h1>
</div>
<div class="exg_12">
<h1>marker</h1>
</div> </html>
效果图如下:
css3のtext-shadow的更多相关文章
- 使用CSS3创建文字颜色渐变(CSS3 Text Gradient)
考虑一下,如何在网页中达到类似以下文字渐变的效果? 传统的实现中,是用一副透明渐变的图片覆盖在文字上.具体实现方式可参考 http://www.qianduan.net/css-gradient-te ...
- [CSS3] Text ellipsis
Link: http://www.w3schools.com/cssref/tryit.asp?filename=trycss3_text-overflow div{ white-space: now ...
- CSS3 笔记三(Shadow/Text/Web Fonts)
CSS3 Shadow Effects text-shadow box-shadow 1> text-shadow The text-shadow property adds shadow to ...
- CSS3与页面布局学习总结(六)——CSS3新特性(阴影、动画、渐变、变形、伪元素等)
CSS3在CSS2.1的基础上新增加了许多属性,这里选择了较常用的一些功能与大家分享,帮助文档中有很详细的描述,可以在本文的示例中获得帮助文档. 一.阴影 1.1.文字阴影 text-shadow&l ...
- CSS3与页面布局学习笔记(六)——CSS3新特性(阴影、动画、渐变、变形( transform)、透明、伪元素等)
一.阴影 1.1.文字阴影 text-shadow<length>①: 第1个长度值用来设置对象的阴影水平偏移值.可以为负值 <length>②: 第2个长度值用来设置对象的阴 ...
- 使用CSS3的appearance属性改变元素的外观
昨天在和同事一起完成项目的时候,我使用了appearance来渲染select,但是在firefox下出现问题,不完美,最后去除了.但还是要学习下这个属性.大家都知道每个浏览器对HTML元素渲染都不一 ...
- IE中的CSS3不完全兼容方案
摘要: Internet Explorer,其本身也是足够强大的.IE特有的技术可以很好的实现一些CSS3的效果. 到Internet Explorer 8为止,IE系列是不支持CSS3的.在IE中要 ...
- 针对css3特性浏览器兼容 封装less
//--------------------------------------------------- // LESS Prefixer //--------------------------- ...
- CSS3之阴影
CSS3中新增属性-阴影,可以做出很多漂亮的效果. 文字阴影text-shadow text-shadow属性值的顺序: text-shadow: h-shadow v-shadow blur col ...
- CSS3:线上编辑工具及实用资料整理
an I Use 个人最常用的,资料比较全,桌面和移动浏览器支持HTML5,CSS3,SVG和兼容性表. 官网地址:http://caniuse.com/ CSS3 Click Chart CSS3 ...
随机推荐
- 使用MongoDB.NET 2.2.4驱动版本对 Mongodb3.3数据库中GridFS增删改查
Program.cs代码如下: internal class Program { private static void Main(string[] args) { GridFSHelper help ...
- AC自动机-题目集合
AC自动机-题目集合 模板 如果你想要学习AC自动机,推荐一些学习资料. 学习可以看这篇博客 http://blog.csdn.net/niushuai666/article/details/7002 ...
- Python: PS 滤镜--水波特效
本文用 Python 实现 PS 滤镜中的 水波特效 import numpy as np from skimage import img_as_float import matplotlib.pyp ...
- ubuntu 下编译安装ceph
git clone --recursive https://github.com/ceph/ceph.git cd ceph/ sudo apt-get install libtool sud ...
- CodeForces - 762E:Radio stations (CDQ分治||排序二分)
In the lattice points of the coordinate line there are n radio stations, the i-th of which is descri ...
- LiveCD、LiveDVD和BinDVD区别在哪里
本文转载自: http://www.kankanews.com/ICkengine/archives/86968.shtml 1.CentOS系统镜像有两个,安装系统只用到第一个镜像即CentOS-6 ...
- adb 调试命令
一.抓log 1. cat /proc/kmsg:抓kernel log(串口log) 2. 进入工程模式:adb shell am start -n com.mediatek.engineermo ...
- 总结open与fopen的区别
https://www.zybuluo.com/yiltoncent/note/87461 参考链接1 参考链接2 对于这两个名字很类似的函数,对于很多初学者来说,不容易搞清楚它们有什么不同,只知道按 ...
- Oracle 11g client 安装
本文所有红色字体标注的为本人计算机安装方法(Oracle 11g安装在本地 Oracle 11g client 也是安装在本地 如果情况一致 可参照本人方法安装) Oracle 11g client ...
- STLstack,queue
今天一开始用C去摸栈和队列,差不多昨天早上也在摸,摸烦了就去搞DP然后DP也没搞好,就是很烦很烦!!!! 然后今天那些C的栈队列的步骤和名称熟的不要不要的,然而数据结构的c语言用指针,传递,简直麻烦, ...