---恢复内容开始---

css3新增核心知识
背景和边框
文本效果
2d/3d转换
过渡和动画
多列布局
弹性盒模型
媒体查询
增强选择器 css3浏览器兼容性 css3在线工具
css3generator
http://css3generator.com/
https://www.colorzilla.com/gradient-editor/
https://css-tricks.com/examples/ButtonMaker/ border-radius:15px 25px 35px 45px; 左上角,右上角,右下角,左下角 css3阴影:
box-shadow:h-shadow v-shadow blur color 设置背景图片:
background-image(允许设置多个背景图片)
clip
origin
size background-image:url(shixun.png),url(bg.png);
position:right top,left top
repeat:no-repeat,repeat
origin
文本: text-shadow
word-wrap:换行 break-word 强制换行
text-overflow :设置文本内容溢出时控制规则
word-break
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis css3 选择器
https://www.caniuse.com/
新增选择器:
属性选择器 [^:开头 $结尾 ~其中有一个]
伪类选择器:first-child nth-child(1) first-of-type 匹配同类型中的第一个同级兄弟元素E
伪元素选择器::: 已经不局限使用样式选择器,对内容进行操作 E::before 配合content使用
E::after 配合content使用
E::first-letter 第一个字母
E::first-line 设置元素第一行的样式
E::selection 设置元素被选中的样式 2019/7/17
css3 过渡:将元素从一种状态转变为另一种状态(简单的动画效果) transition-property 设置过渡属性(效果)
transition-duration 设置过渡效果持续时间(n ms内完成)
transition-timing-function 设置过渡效果时间曲线
transition-delay 设置过渡效果开始时间(延迟) transition:property duration timing-function delay
transition:width 2s linear 1 css3动画 利用@keyframes 创建高级动画效果
@keyframes 设置动画效果
animation 执行动画动作(简写形式)
animation-name 设置@keyframes动画的名称
animation-duration 设置动画完成一个周期所花费的毫秒 2019/7/18 css3 2d转换
transform 转换方法名称 transform:rotate(9deg);
-webkit-transform:rotate(9deg);
..... transform:scale(2,0.5) 缩放
transfrom:translate(200px,50px);移动 //第一个参数left,二top
transform:skew(20deg,20deg);//第一个参数围绕x,第二个围绕y轴 css3 3d 转换 rotatex()
rotateY() scalex()
scaley() css3 媒体查询介绍---实现自适应布局 背景:针对不同的访问设备呈现不同的布局效果 在css3中利用媒体查询技术可以实现页面的“自适应布局” 响应式布局|| 自适应布局 响应式布局:
一套布局适应不同设备
自适应布局:
根据分辨率的不同,界面有会调整 查询实现的方法:
@media
第一种方式
@media 类型 and (条件1) and (条件2) {
...css样式定义
} @media screen and (min-width:375px) and (max-width:980px) {
body { }
} 第二种:@importt 导入制定css /*当屏幕可视窗口尺寸 <=980 px 像素时导入default.css文件*/
@import url("default.css") screen and (max-width:980px); 第三种:在link标签中导入指定css default.css
index.html
<link href="default.css" media="screen and (max-width:980px)"/>

  1.过渡

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
div {
width:200px;
height:100px;
background: #ccc;
transition-property:width;
transition-duration:2s;
transition-timing-function:linear;
transition-delay:1s;
} div:hover {
width:500px;
} </style>
</head>
<body>
<div>hello world!</div>
</body>
</html>

  2.动画:

  

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
div {
width:200px;
height:100px;
background: #ccc;
animation-name: animation-1;
animation-duration: 2s;
animation-iteration-count: infinite; /*定义动画播放的次数*/
animation-direction: alternate;
animation-play-state: running;
} @keyframes animation-1 {
from {
background:yellow;
} to {
background:blue;
}
} </style>
</head>
<body>
<div>hello world!</div>
</body>
</html>

  3.用media做的自适应布局

html:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<link rel="stylesheet" href="main.css">
</head>
<body>
<div>
<header>
<ul>
<li>导航1</li>
<li>导航2</li>
<li>导航3</li>
<li>导航4</li>
<li>导航5</li>
</ul>
</header>
<article>
<section>内容1</section>
<section>内容2</section>
<section>内容3</section>
</article>
<footer class="footer">
底部
</footer>
</div>
</body>
</html>

  css:

  

* {
margin: 0;
padding: 0;
} div {
width:1200px;
text-align: center;
line-height: 50px;
font-size: 30px;
margin: 0 auto;
color:#fff;
} header {
background: red;
height:50px;
} header ul {
width:100%
} header ul>li {
width:20%;
float: left;
list-style: none;
font-size:none;
border-right:4px solid #fff;
box-sizing: border-box;
} article {
width:100%;
height:300px;
border-top: 5px solid #fff;
border-bottom: 5px solid #fff; }
section:first-child {
width:20%;
height:300px;
border-right:5px solid #fff;
background:red;
float:left;
box-sizing: border-box;
} section:nth-child(2){
width:60%;
height:300px;
border-right:5px solid #fff;
background:green;
float:left;
box-sizing: border-box;
} section:last-child {
width:20%;
height:300px;
background:blue;
float:left;
box-sizing: border-box;
} footer {
width:100%;
background: pink;
} @media screen and (max-width:980px){
section:last-child {
display:none;
} section:first-child {
width:40%;
box-sizing: border-box;
} section:nth-child(2){
width:60%;
box-sizing: border-box;
border:none;
}
} @media screen and (max-width:640px) {
header,
footer {
display: none;
}
section:first-child,
section:nth-child(2),
section:last-child {
width: 100%;
display: block;
float:none;
border:none;
} }

1.结果

1.屏幕大于980px 

2.大于640px 小于980px

3.小于640px:

---恢复内容结束---

css3特性简要概括的更多相关文章

  1. html5特性简要概括

    1.html5主要的设计目的: 互联网语义化,以便更好地被人类和机器阅读 更好的在移动设备上支持web应用 https://www.w3.org/TR/html5 新增内容: 新的语义标签 <h ...

  2. [转]JavaScript快速检测浏览器对CSS3特性的支持

    转自:https://yuguo.us/weblog/detect-css-support-in-browsers-with-javascript/ ------------------------- ...

  3. ExtJS的4.1新特性简要介绍

    ExtJS的4.1新特性简要介绍 一.动态加载机制 Ext.require动态加载任何类,并且会加载依赖类: 二.新类系统 •类定义:ExtJS4.0以后应入了Ext.define方法,他通过类的字符 ...

  4. 现在就能投入使用的12个高端大气上档次的CSS3特性

    原文:http://tutorialzine.com/2013/10/12-awesome-css3-features-you-can-finally-use/ 原文中有demo展示及下载. 翻译开始 ...

  5. 20个非常绚丽的 CSS3 特性应用演示

    这篇文章收集了20个非常绚丽的 CSS3 效果应用演示,这些示例演示了 CSS3 各种新特性的强大能力.随着越来越多的浏览器对 CSS3 支持的不断完善,设计师和开发者们有了更多的选择,以前需要使用  ...

  6. 利用CSS3特性巧妙实现漂亮的DIV箭头

    DIV箭头用于表现DIV内容的指向,是使用非常普遍的一种表现形式,例如新浪微博的消息转发: 还有傲游网站的导航条: 像傲游账户上方这种箭头更需要多幅图片以表现箭头和hover的效果. 传统的实现方式都 ...

  7. CSS3特性修改(自定义)浏览器默认滚动条

    前言:我们做前端时,会遇到一些需求,要求把默认浏览器的滚动条样式给改写了,诶.好好的改它干啥了,也带不来用户体验,就是好看点嘛!实现原理其实是用了伪元素,webkit的伪元素实现很强,可以把滚动条当成 ...

  8. Risc-V简要概括

    1.Risc-V硬件平台术语 一个RiscV硬件平台可以包含一个或多个RiscV兼容的核心.其它非RiscV兼容的核心.固定功能的加速器.各种物理存储器结构.I/O设备以及允许这些部件相互连通的互联结 ...

  9. 字符输出流Writer简要概括

    偷个懒,直接参考上篇字符输入流Reader的形式,其实Reader和Writer本来就大同小异: 字符输出流Writer 本篇将对JAVA I/O流中的字符输出流Writer做个简单的概括: 总得来说 ...

随机推荐

  1. java和javascript日期详解

    ** java,js日期转换:** <Excerpt in index | 首页摘要> java的各种日期转换 <The rest of contents | 余下全文> 日期 ...

  2. mongo的基本命令操作

    基本用法学习:https://www.runoob.com/mongodb/mongodb-create-database.html MongoDB数据库基本用法 show dbs:显示数据库列表 s ...

  3. fastdfs+nginx make时报错fatal error:fdfs_define.h: 没有那个文件或目录

    环境: ubuntu 18.04.1 fastdfs-nginx-module_v1.16 root@wang-machine:~/桌面/FastDFS# cd nginx-1.8.1/root@wa ...

  4. 押宝在Apple Watch的智能手表游戏玩得转吗?

    Watch的智能手表游戏玩得转吗?" title="押宝在Apple Watch的智能手表游戏玩得转吗?"> 如果你给法拉利跑车贴上金箔,会被认为是俗气.但若在Ap ...

  5. 我的第一个Quartz代码

    创建Maven项目   打开Eclipse->File->Project->Maven ->Maven Project直接下一步输入Group Id和Artifact Id , ...

  6. 吴裕雄--天生自然python编程:实例(1)

    str = "www.runoob.com" print(str.upper()) # 把所有字符中的小写字母转换成大写字母 print(str.lower()) # 把所有字符中 ...

  7. 《JavaScript算法》常见排序算法思路与代码实现

    冒泡排序 通过相邻元素的比较和交换,使得每一趟循环都能找到未有序数组的最大值或最小值. 最好:O(n),只需要冒泡一次数组就有序了. 最坏: O(n²) 平均: O(n²) *单项冒泡 functio ...

  8. git push的完整形式

    现在的情况是,本地有两个分支:master.div, 远程仓库有一个分支:master,本地master分支和远程master分支建立有跟踪联系,这样本地master分支提交时直接git push(只 ...

  9. 如何安装与配置MySQL

    关键词:MySQL,安装,配置 这一节,我们讨论一下MySQL的安装配置与卸载 下载 网址:https://dev.mysql.com/downloads/mysql/ 选择社区版,找到对应的电脑,开 ...

  10. iOS开发黑科技之runtime

    iOS 开发之黑科技-runtime runtime其实就是oc底层的一套C语音的API 调用方法的本质就是发消息, 1.动态交换两个方法的实现(特别是交换系统自动的方法) 2.动态添加对象的成员变量 ...