博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
css3记事
阅读量:4334 次
发布时间:2019-06-07

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

 

 

1.文字超出省略

text-overflow: ellipsis
white-space: nowrap;        overflow: hidden;        text-overflow: ellipsis;

 *父元素font-size:0 会影响到省略符号的显示

 

2.模糊背景图and IOS背景模糊

filter

filter: url(blur.svg#blur); /* FireFox, Chrome, Opera */    -webkit-filter: blur(10px); /* Chrome, Opera */       -moz-filter: blur(10px);        -ms-filter: blur(10px);                filter: blur(10px);    filter: progid:DXImageTransform.Microsoft.Blur(PixelRadius=10, MakeShadow=false); /* IE6~IE9 */

可以配合父元素透明度背景色rgba

 

 

ios背景模糊 

backdrop-filter: blur(10px)

 

 

3.stick footer布局

 

 

4.transition效果过度交互

 transition: all 0.6s

通过改变class值来展示

 

5.flex布局

 

6.scale缩放

图片0.6秒内放大1.4倍

img{
transition: all 0.6s; } img:hover{
transform: scale(1.4); }

 

 

7.背景图固定

background-attachment: fixed;

 

8.a标签添加下划线

a{
text-decoration:underline;}

 

9.字体引用

@font-face{
font-family: myFirstFont;src: url('Sansation_Light.ttf'), url('Sansation_Light.eot'); /* IE9+ */}div{
font-family:myFirstFont;}

 

10.@media 查询

分辨率小于300px时body背景色为蓝色,分辨率为301~2000px时body背景色为红色

@media screen and (max-width: 300px) {
body { background-color:blue; }}@media (min-width: 301px) and (max-width: 2000px){
body{ background-color:red; }}

 

11.textarea不可拖动

resize: none;

 

12.背景色渐变

带有指定角度的线性渐变

#grad {
background: -webkit-linear-gradient(180deg, red, blue); /* Safari 5.1 - 6.0 */ background: -o-linear-gradient(180deg, red, blue); /* Opera 11.1 - 12.0 */ background: -moz-linear-gradient(180deg, red, blue); /* Firefox 3.6 - 15 */ background: linear-gradient(180deg, red, blue); /* 标准的语法 */}

 

13.隐藏chrome滚动条

例:隐藏body的滚动条

body::-webkit-scrollbar {
display:none;}

 

14.旋转

例:旋转10度。可以使用负数

transform:rotate(10deg)

 

转载于:https://www.cnblogs.com/miangao/p/8875969.html

你可能感兴趣的文章
Hadoop 服务器配置的副本数量 管不了客户端
查看>>
欧建新之死
查看>>
自定义滚动条
查看>>
APP开发手记01(app与web的困惑)
查看>>
笛卡尔遗传规划Cartesian Genetic Programming (CGP)简单理解(1)
查看>>
mysql 日期时间运算函数(转)
查看>>
初识前端作业1
查看>>
ffmpeg格式转换命令
查看>>
万方数据知识平台 TFHpple +Xpath解析
查看>>
Hive实现oracle的Minus函数
查看>>
秒杀多线程第四篇 一个经典的多线程同步问题
查看>>
RocketMQ配置
查看>>
vs code调试console程序报错--preLaunchTask“build”
查看>>
蚂蚁金服井贤栋:用技术联手金融机构,形成服务小微的生态合力
查看>>
端口号大全
查看>>
机器学习基石笔记2——在何时可以使用机器学习(2)
查看>>
POJ 3740 Easy Finding (DLX模板)
查看>>
MySQL 处理重复数据
查看>>
关于typedef的用法总结(转)
查看>>
【strtok()】——分割字符串
查看>>