Home > Web Front-end > HTML Tutorial > (一)css代码积累--自己经常忘记,但是总记不住的代码_html/css_WEB-ITnose

(一)css代码积累--自己经常忘记,但是总记不住的代码_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:23:56
Original
1738 people have browsed it

1.透明度设置

90%透明:filter:alpha(opacity=90);-moz-opacity:0.90;-khtml-opacity: 0.90;opacity: 0.90;

80%透明:filter:alpha(opacity=80);-moz-opacity:0.80;-khtml-opacity: 0.80;opacity: 0.80;

70%透明:filter:alpha(opacity=70);-moz-opacity:0.70;-khtml-opacity: 0.70;opacity: 0.70;

60%透明:filter:alpha(opacity=60);-moz-opacity:0.60;-khtml-opacity: 0.60;opacity: 0.60;

50%透明:filter:alpha(opacity=50);-moz-opacity:0.50;-khtml-opacity: 0.50;opacity: 0.50;

40%透明:filter:alpha(opacity=40);-moz-opacity:0.40;-khtml-opacity: 0.40;opacity: 0.40;

30%透明:filter:alpha(opacity=30);-moz-opacity:0.30;-khtml-opacity: 0.30;opacity: 0.30;

20%透明:filter:alpha(opacity=20);-moz-opacity:0.20;-khtml-opacity: 0.20;opacity: 0.20;

10%透明:filter:alpha(opacity=10);-moz-opacity:0.10;-khtml-opacity: 0.10;opacity: 0.10;

完全透明:filter:alpha(opacity=0);-moz-opacity:0;-khtml-opacity: 0;opacity: 0;

 

2.字间距/字母间距、单词间距

字间距(字母间距):letter-spacing:5px

单词间距:word-spacing

 

3.同一组的单选按钮,name取值一定要一致。这样同一组的单选按钮才起作用。

 

4.在线QQ链接设置

 

5.copyright中的特殊字符

 © 

 

6.一键拨打效果电话号码

 

7.强制对数字字母折行

word-wrap: break-word; break-word: break-all;

 

8.背景色透明

background: rgba(0,0,0,0.6);

 

9.button的onclick事件打开新的页面/本地页面

当前页面直接跳转至新页面:
需要打开一个新的页面进行跳转,相当于a标签的target="_blank"属性:

 

10.圆角矩形代码

border-radius: 5px; border: 1px solid #fc959f;padding: 5px;

 

11.注释

单行注释以 // 开头。 多行注释以 /* 开始,以 */ 结尾。

在CSS中用/* 注释语句 */

在HTML中用

 

12.返回上一页

javascript:history.go(-1);

 

13.手机屏幕

 

14.线性渐变——不会常用到

background: linear-gradient(rgba(50,60,60, 1), rgba(50,60,60, 0.7));

 

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template