博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
常用css 样式积累
阅读量:6992 次
发布时间:2019-06-27

本文共 1877 字,大约阅读时间需要 6 分钟。

清除浮动

/* For modern browsers */.clearfix:before,.clearfix:after{     content:"";     display:table; } .clearfix:after{clear:both;} .clearfix{     *zoom:1;/*IE/7/6*/}

单行文本溢出显示省略号

li{   white-space:nowrap;    text-overflow:ellipsis;    -o-text-overflow:ellipsis;    overflow: hidden; }

清除 IE8 下a的虚线框

body a,body input{outline:none;blr:expression(this.onFocus=this.blur());}

HTML、CSS禁止选择文字,针对IE、FF、Chrome等

//HTML、CSS禁止选择文字,针对IE、FF、Chrome等
你选不了我,unselectable: IE/Opera, -moz-user-select: FireFox, onselectstart: IE/Safari, -webkit-user-select:Chrome

>箭头

font: 400 9px/14px consolas

选择的文本样式

::selection{ background:#F00; color:#FFF; }::-webkit-selection{ background:#F00; color:#FFF; }::-o-selection{ background:#F00; color:#FFF; }::-moz-selection{ background:#F00; color:#FFF; }

移动端清除点击背景样式

html{-webkit-tap-highlight-color:rgba(0, 0, 0, 0);}

移动端select样式

select { -webkit-appearance: none; appearance: none; border: none; display: block; width: 100%; -webkit-box-sizing: border-box; box-sizing: border-box; background-color: #FFFFFF; color: #333333; }

CSS旋转

@-webkit-keyframes rotate {        0%,        100% {            -webkit-transform: rotate(0deg);        }        100% {            -webkit-transform: rotate(-360deg);        }    }    @keyframes rotate {        0%,        100% {            transform: rotate(0deg);        }        100% {            transform: rotate(-360deg);        }    }    .rotateing {        font-size: 18px;        //为了尽可能兼容各个浏览器        -moz-animation: rotate .8s linear infinite;        -webkit-animation: rotate .8s linear infinite;        -o-animation: rotate .8s linear infinite;        -ms-animation: rotate .8s linear infinite;        animation: rotate .8s linear infinite;    }

多行溢出省略显示

display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 3;overflow: hidden;

转载于:https://www.cnblogs.com/aoxiaoqiang/p/4988371.html

你可能感兴趣的文章
Struts2源码浅析-初始化
查看>>
nginx安装
查看>>
angularjs 利用filter进行表单查询及分页查询
查看>>
stack
查看>>
SCAU 8588 表达式求值
查看>>
OD使用教程5 - 调试篇05|解密系列
查看>>
kindeditor 操作时同步到textarea
查看>>
修改已经释放了的请求号
查看>>
重写和强制转换再调用能编译但不能运行
查看>>
logging ,re 模块
查看>>
Android入门之GridView(表格控件)
查看>>
JavaScript基础篇
查看>>
Cesium 加载天地图
查看>>
Centos7中安装最新版maven3.5.0
查看>>
python学习之老男孩python全栈第九期_数据库day003 -- 作业
查看>>
深度优先遍历
查看>>
常用类型转换 一.常用int和string类型转换
查看>>
Ext Js简单Grid分页及选择器的使用
查看>>
slice 定义和用法
查看>>
分类游戏 结构体
查看>>