CSS
来源:互联网 发布:郑州八度网络怎么样 编辑:程序博客网 时间:2024/06/03 19:47
1 文本属性
- font-style:斜体,可区分中/英文设置。
- font-family:字体。一组字体候选列表,供浏览器查找使用。
- font-size:字体大小。px/%/em。
- text-decoration:字体线。可多选属性:
- line-through:删除线
- underline:下划线
- overline:上划线
- none(default):无。
多属性简写:
font: font-style(可选) font-variant(可选) font-weight(可选) font-size/line-height(可选) font-family(逗号分隔多个选项);
1.1 关于font-family
font-family: "Source Code Pro" MicrosoftYaHei sans-serif;
- font-family属性值为候选字体或字体系列的列表,最多可使用5个值。
- sans-serif系列:没有衬线的字体系列。
- 浏览器会按照属性按顺序查找计算机是否已安装字体,若没有则查找下一个,直至结束。
- 字体名称区分大小写。
1.2 自定义字体
@font-face{ font-family: "Source Code"; //字体名字,一个单词可省略双引号 src:url('xxx.woff'), url('xxx.ttf');}
2 文本不换行,超出部分以…显示
overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 210px; //除width属性外,其他属性顺序不能颠倒
3 文本禁止选择
-webkit-touch-callout: none; /* iOS Safari */-webkit-user-select: none; /* Chrome/Safari/Opera */-khtml-user-select: none; /* Konqueror */-moz-user-select: none; /* Firefox */-ms-user-select: none; /* Internet Explorer/Edge */user-select: none; /* Non-prefixed version, currently not supported by any browser */
0 0
- CSS
- css
- css
- css
- css
- CSS
- CSS
- css
- css
- CSS
- css
- css
- CSS
- css
- CSS
- css
- CSS
- css
- 输出日期
- 打电话的3种方式
- (codeforces)B. Bear and Different Names
- Java配置----JDK开发环境搭建及环境变量配置
- bash博弈变体
- CSS
- 1047. Student List for Course (25)
- .net 在后置代码中输入JS提示语句(背景不会变白)
- double保留小数
- 活动选择问题
- Vi编辑器在编辑状态上下左右方向键和Backspace键“失灵”
- 【Mybatis】——动态sql
- 面试之设计模式
- glusterfs进程