CSS属性

style改变样式	        
  <body style = "background-color:Blue;">				//背景颜色
  <h1 style = "text-align:center">This is a heading</h1>	     //居中
  <p style = "color:blue">This text is blue</p>			//文本颜色
  <p style = "font-family:arial;color:blue;font-size:20px;"> //字体颜色大小
  <p>This text is 20 pixels and blue</p>
  </body>

HTML 链接 - target 属性
<a href="http://www.w3school.com.cn/" target="_blank">Visit W3School!</a>
<p>如果把链接的 target 属性设置为 "_blank",该链接会在新窗口中打开。</p>

HTML 链接 - name 属性(使用链接跳转至文档的另一部分)
<p><a href="#C4">查看 Chapter 4。</a></p>
<h2><a name="C4">Chapter 4</a></h2>
<p>This chapter explains ba bla bla</p>

替换文本属性(Alt)
<img src="boat.gif" alt="Big Boat">
在浏览器无法载入图像时,替换文本属性告诉读者她们失去的信息。此时,浏览器将显示这个替代性的文本而不是图像。

border表格和边框属性	cellpadding单元格边距	cellspacing单元格间距
<table border="1" cellpadding="10" cellspacing="10" frame="box"></table>

跨行或跨列表格单元格
<th colspan="2">电话</th>	//跨列
<th rowspan="2">电话</th>	//跨行

class属性
<head>
<style type="text/css">
h1.intro {color:blue;}
p.important {color:green;}	
</style>
</head>
<body>
<h1 class="intro">Header 1</h1>
<p>A paragraph.</p>
<p class="important">Note that this is an important paragraph.</p>
</body>

2D变换
transform:rotate(30deg);		//顺时针旋转30°
transform:scale(1.2)	//0~1缩小,>1放大

3D变换
transform-style:preserve-3d;
transform:rotateX(30deg);	//绕x轴旋转
transform:rotateY(30deg);
transform:rotateZ(30deg);
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值