文本颜色和效果——text-decoration
来源:互联网 发布:文网文增加域名 编辑:程序博客网 时间:2024/06/05 13:05
一、文本颜色
- 定义颜色方式 :1、颜色名称 2、RGB值(eg:#CC66FF #C6F rgb(204, 102, 255) rgb(80%, 40%, 100%)) #FFFFFF:白色
- 特殊文本效果:只对包含文本的css元素有用,对其他对象没有效果。
1、text-decoration属性:(大多数浏览器为超文本链接自动使用text-decoration:underline)
例子:HTML页面代码:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> 特殊文本处理 </TITLE>
<link rel="stylesheet" type="text/css" href="10-1.css">
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<BODY>
<table class="nav" border="0" align="right">
<tr><th><a href="2-7.html">HOME</a></th></tr>
<tr><th><a href="2-8.html">INFO</a></th></tr>
<tr><th><a href="2-9.html">HELP</a></th></tr>
<tr><th><a href="2-7.html">NEWs</a></th></tr>
</table>
<h1>I <em>love</em> to decorate!</h1>
<p>I think that decorationg <span class="oops">cakes</span>HTML is lots of fun. Here are some of my favorites:</p>
<div class="eg">
<p id="a" style="background-color:red">Underlined text (don't you want to click here?)</p>
<p id="b">Line-through text</p>
<p id="c">Overlined text</p>
<p id="d">Blinking text (this is hard to show in print!)</p>
</div>
</body>
</HTML>
css代码
body {
font-family:Verdana, sans-serif;}
.nav {
border:0.3em solid black;}
.nav a:link, .nav a:visited
{
text-decoration:none;}
h1 em {
text-decoration:underline;}
.oops {
text-decoration:line-through;}
.eg {
border:1px solid black;
margin:2em;
padding:1em;}
#a {
text-decoration:underline;}
#b {
text-decoration:line-through;}
#c {
text-decoration:overline;}
#d {
text-decoration:blink;}
- 文本颜色和效果——text-decoration
- CSS——文本样式(text-indent,text-transform,text-decoration,text-justify)
- text-decoration 属性对文本进行修饰。
- Unity Text文本颜色渐变效果
- text-decoration <del> <s> 实现横线从文字中间穿过的CSS效果属性和html标签
- css text-decoration下划线
- text-decoration 入门Demo
- 解决文字和text-decoration:underline下划线重叠问题
- 解决文字和text-decoration:underline下划线重叠问题
- div css 下划线text-decoration
- 关于text-decoration去掉下划线
- CSS中text-decoration属性
- CSS:text-decoration参数说明
- CSS text-index| transform| decoration| text-overflow
- UGUI 设置Text控件文本颜色
- HTML+CSS基础 body标签text属性将普通文本颜色改为白色,实现有趣的密文效果
- text-decoration:none; 为什么不生效
- unity3d ugui text 文字颜色渐变效果~
- 网站加速---Xcache安装
- 听说长得丑外链都不收
- .net笔记一
- HDOJ 题目Largest prime factor(水题)
- linux常用命令大全(转)
- 文本颜色和效果——text-decoration
- struts2乱码问题
- Remove Element
- POJ 1459 Power Network (多源点/汇点最大流问题)
- JS(JQEERY) 获取JSON对象中的KEY VALUE
- contiki系统分析:时钟
- Linux软连接和硬链接
- BufferedReader br=new BufferedReader(new InputStreamReader(System.in)) ; 语句解析
- The Android ION memory allocator