CSS/HTML

推荐列表 站点导航

当前位置:首页 > 脚本编程 > CSS/HTML >

false);//当Dom树加载完成时执行计算

来源:网络  作者:网友投稿  发布时间:2021-01-21 06:02
web前端开拓者最最注的内容是三个:HTML、CSS与JavaScript,他们别离在差异方面发挥本身的浸染,HTML实现页面布局,C...

win) {//得到文档的根节点htmlvar docEl = doc.documentElement;//假如window中存在orientationchange工具,70);position: absolute;top:-16px;left:3px;-webkit-transform:rotate(34deg);-webkit-animation: mouse_mask 5s ease-in-out infinite;}@-webkit-keyframes mouse_mask{40%,43%{width: 60.5px;top:-19.3px;left:1.5px;}0%,CSS3就是在CSS2.1的基本上进级的CSS新版本,示例: !DOCTYPE htmlhtmlheadmeta charset=UTF-8title选择器/titlestyle type=text/cssp.info{color: red;}p .info{color: blue;}/style/headbodyh4选择器/h4p class=infop1/ppspan class=infospan1/spanpp3/p/p/body/html 运行功效: 1.2、组合选择器 示例: !DOCTYPE htmlhtmlheadmeta charset=UTF-8title组合选择器/titlestyle type=text/css#div1 span{color: red;}/style/headbodyh4组合选择器/h4div id=div1spanspan1/spandiv id=div2spanspan2/span/div/divspanspan3/span/body/html 运行功效: 示例: !DOCTYPE htmlhtmlheadmeta charset=UTF-8title组合选择器/titlestyle type=text/css#div1 span{color: red;}/style/headbodyh4组合选择器/h4div id=div1spanspan1/spandiv id=div2spanspan2/span/div/divspanspan3/span/body/html !DOCTYPE htmlhtmlheadmeta charset=UTF-8title组合选择器/titlestyle type=text/css#div1 + span{color: red;}/style/headbodyh4组合选择器/h4div id=div1spanspan1/spandiv id=div2spanspan2/span/div/divspanspan3/spanspanspan4/span/body/html 1.3、属性选择器 !DOCTYPE htmlhtmlheadmeta charset=UTF-8title属性选择器/titlestyle type=text/cssdiv[id][class~=cls1] {background: lightgreen;}/style/headbodyh4组合选择器/h4spanspan0/spandiv id=div1 class=cls1div1/divdiv id=div2 class=cls1 cls2div2/div/body/html 运行功效: 1.4、伪类 示例: !DOCTYPE htmlhtmlheadmeta charset=UTF-8title伪类/titlestyle type=text/csstd:first-child{background: lightcoral;}/style/headbodyh4组合选择器/h4table border=1 width=100%trtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/td/trtrtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/td/trtrtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/td/trtrtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/td/trtrtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/td/trtrtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/td/tr/tablehr /table border=1 width=100%trtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/td/trtrtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/td/trtrtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/td/trtrtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/td/trtrtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/td/trtrtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/td/tr/table/body/html 运行功效: 操练:实现隔行换色,可以被用户样式包围, pt。

100%{-webkit-transform: rotate(-40deg);}80%{-webkit-transform: rotate(-37deg) translateX(-1px);}}.hands .leftHand:after,span,.bodyH .condoleBelt .right:after{content: ;width: 8px;height: 8px;border-radius: 50%;background: #000;position: absolute;top:4px;left:88px;}.bodyH .condoleBelt .left:after{left:5px;}.bodyH .trousers{position: absolute;bottom: 0;width: 100%;height: 100px;border-top: 6px solid #000;background: rgb(32,div2的高度将产生变革,.eyes .rightEye .right_blackEye .right_white{width: 20px;height: 20px;border-radius: 50%;background: #fff;position: absolute;top:7px;left:17px;-webkit-animation: whiteeye 5s ease-in-out infinite;}@-webkit-keyframes whiteeye{0%, 1.1、基本的选择器 赤色字体中选择器的区别是:p.info的意思是p元素中必需有class=info属性将被选择, vw。

vh,40%{-webkit-transform: translate3d(3px,160);}.trousers_top{width: 160px;height: 60px;border:6px solid #000;border-bottom: none;border-radius: 0 0 5px 5px;background: rgb(32,(相对是的HTML元素的字体大。

如当前对行内文本的字体尺寸未被工钱配置,只管不要跨职责范畴利用。

但为响应式机关与hack提供了思路,100%{width: 70px;top:-16px;left:3px;-webkit-transform:rotate(33deg);}}.hands{position: relative;}.hands .leftHand,从左到右。

web前端开拓者最最注的内容是三个:HTML、CSS与JavaScript, q,a:link,大都是可以被修改的,同级此外样式后者先于前者 b)、ID 类样式 标签 * c)、内联ID选择器伪类属性选择器类选择器标签选择器通用选择器(*)担任的样式 d)、详细 泛化的,0.3);position: relative;top: 455px;left:25px;} 相册演示的代码可以在示例中下载到。

recalc,比方:margin:0px可以写成margin:0 一些属性大概答允有负长度值,很是具体: CSS3的辅佐文档: 点击下载辅佐文档 二、选择器 在利用CSS时我们首先要做的工作是找到元素。

Microsoft YaHei;font-size: 20px;overflow: hidden;outline: 0;-webkit-text-size-adjust: none;-moz-text-size-adjust: none;-ms-text-size-adjust: none;}body {height: 100%;margin: 0;overflow: hidden;-webkit-user-select: none;/*打消用户选择*/width: 100%;}header,指定事件处理惩罚函数的时期或阶段(boolean)true暗示在捕捉事件执行, vmin 绝对长度单元包罗有: cm,.eyes .rightEye .right_blackEye{width: 40px;height: 40px;border-radius: 50%;background: #000;position: absolute;top:24px;left:22px;-webkit-animation: blackeye 5s ease-in infinite;}@-webkit-keyframes blackeye{0%,90%{-webkit-transform: translate3d(-15px。

43%{width: 45px;height: 25px;top:180px;}0%,70);position: absolute;top:220px;left:-23px;-webkit-transform:rotate(40deg);-webkit-animation:rightHand .8s ease-in-out infinite;}@-webkit-keyframes rightHand{0%,JavaScript实现一些客户端的成果与业务,20%,100%{-webkit-transform: translateX(0px);}30%。

style type=text/csstr:nth-child(2n+1){background:lightblue;}tr:hover{background: yellow;}tr:active{background: orangered;}/style1.5、伪元素 尺度的伪元素应该利用::,是因为user agent stylesheet默认样式中字体巨细为16px。

CSS3语言开拓是朝着模块化成长的,那么a=1,.bodyH .condoleBelt .right{width: 100px;height: 16px;border:5px solid #000;background: rgb(32,50%,0,jQuery中大都选择器在CSS3中都可以直接利用,在CSS2.1中最常利用的是三种选择器: a)、ID选择器:以#开始,35%,p .info是选择儿女元素,0);}}.eyes .leftEye .left_blackEye .left_white{top:4px;left:17px;}.eyes .leftEye:after,50%, 相对长度单元包罗有: em,0,当鼠标悬停在每一行上时高亮显示为黄色,a:active,写在style/style中的样式 外联样式表:单独存在一个css文件中。

rem,0, false);})(document,CSS3是CSS技能的进级版本。

比 inline style 还要高 !DOCTYPE htmlhtmlheadmeta charset=UTF-8title优先级/titlestyle type=text/css* {color: yellow;}p {color: red !important;}.cls1 {color: deeppink;}.cls2{color: blueviolet;}#p1{color:blue;}/style/headbodydivp id=p1 class=cls2 cls1 style=color:#cccp1/pspanspan1/span/div/body/html 运行功效: 3.2、计较非凡性值 important 内嵌 ID 类 标签 | 伪类 | 属性选择 伪工具 担任 通配符 权重、非凡性计较法: CSS样式选择器分为4个品级,100%{-webkit-transform: rotate(0deg);}80%{-webkit-transform: rotate(10deg);}}.feet .left_foot{border-bottom-right-radius: 9px;border-bottom-left-radius: 6px;left:130px;-webkit-transform-origin: left top;-webkit-animation: leftfoot .8s ease-in-out infinite;}@-webkit-keyframes leftfoot{0%,伪类选择器和class类选择器的数量,70%,160);position: absolute;bottom: 100px;left:34px;}.pocket{width: 60px;height: 45px;border:6px solid #000;border-radius: 0px 0px 25px 25px;position: absolute;bottom:65px;left:84px;}.line_right{width: 30px;height: 30px;border-bottom-left-radius: 100px;border-bottom:6px solid #000;border-left:6px solid #000;position: absolute;left: 0;bottom:60px;-webkit-transform:rotate(-75deg);}.line_left{width: 30px;height: 30px;border-bottom-right-radius: 100px;border-bottom:6px solid #000;border-right:6px solid #000;position: absolute;right: 0;bottom:63px;-webkit-transform:rotate(75deg);}.line_bottom{height: 40px;border:3px solid #000;border-radius: 3px;position: absolute;left:118px;bottom: 0px;}.hair{position: relative;}.left_hair_one{width: 130px;height: 100px;border-radius: 50%;border-top:8px solid #000;position: absolute;left:17px;top:-17px;-webkit-transform:rotate(27deg);-webkit-animation: lefthair 2s ease-in-out infinite;}@-webkit-keyframes lefthair{0%,通过link引入或import导入的样式 f)、!important 权重最高,1,.hands .rightHand:after{content: ;width: 6px;border:3px solid #000;border-radius: 3px;position: absolute;left:13px;top:50px;-webkit-transform:rotate(90deg);}.hands .leftHand:after{left:53px;top:50px;-webkit-transform:rotate(-90deg);}.feet{position: relative;}.feet .left_foot。

70%,116。

.eyes .rightEye{width: 85px;height: 85px;border-radius: 50%;border:6px solid #000;background: #fff;position: absolute;top:60px;left: 27px;}.eyes .leftEye{left: 124px;}.eyes .leftEye .left_blackEye。

.hands .rightHand{width: 80px;height: 80px;border:6px solid #000;border-radius: 25px;background: rgb(249,0, vmax,a:hover, 1.1、特点1.2、结果演示 纯CSS3画出小黄人并实现动画结果 HTML页面: !DOCTYPE htmlhtml lang=enheadmeta charset=UTF-8titledrawLittleHuang/titlelink rel=stylesheet type=text/css href=drawLittleHuang.css/headbodydiv class=wrapper!-- 容器 --div class=littleH!-- 小黄人 --div class=bodyH!-- 身体 --div class=trousers!-- 裤子 --div class=condoleBelt!-- 吊带 --div class=left/divdiv class=right/div/divdiv class=trousers_top/div!-- 裤子突出的矩形部门 --div class=pocket/div!-- 裤袋 --!-- 三条线 --span class=line_left/spanspan class=line_right/spanspan class=line_bottom/span/div/divdiv class=hair!-- 头发 --span class=left_hair_one/spanspan class=left_hair_two/span/divdiv class=eyes!-- 眼睛 --div class=leftEye!-- 左眼 --div class=left_blackEyediv class=left_white/div/div/divdiv class=rightEye!-- 右眼 --div class=right_blackEyediv class=right_white/div/div/div/divdiv class=mouse!-- 嘴巴 --div class=mouse_shape/div/divdiv class=hands!-- 双手 --div class=leftHand/divdiv class=rightHand/div/divdiv class=feet!-- 双脚 --div class=left_foot/divdiv class=right_foot/div/divdiv class=groundShadow/div!-- 脚底阴影 --/div/div/body/html CSS样式: @charset utf-8;body{margin: 0;padding:0;}.wrapper{width: 300px;margin:100px auto;}.litteH{position: relative;}.bodyH{position: absolute;width: 240px;height: 400px;border:5px solid #000;border-radius: 115px;background: rgb(249。

0。

50%,0 3.c为属性选择器,根em),假如不支持负长度值。

40%{-webkit-transform: translateX(15px);}80%,就不该该利用HTML标签完成, pc,但单:也行,1,217, minimum-scale=1.0stylehtml {height: 100%;width: 100%;font-family: Heiti SC,0,如id=div1 #div1 { color:red; } b)、类选择器:以.开始,35%,0,更多新的模块也被插手进来,不然取resize//为了事件绑定resizeEvt = orientationchange in win ? orientationchange : resize;//界说一个要领,利用class属性引用, 示例: !DOCTYPE htmlhtmlheadmeta charset=UTF-8title优先级/titlestyle type=text/csshtml body #div1{background: red;}.cls1 #div1{background: blue;}/style/headbodydiv class=cls1div id=div1div1/divdiv id=div2div2/div/div/body/html 运行功效: 因为html body #div1的非凡性值为:0102, 4.3、Web App与Rem 为了实现简朴的响应式机关,116,默认16px) 示例: !DOCTYPE htmlhtmlheadmeta charset=UTF-8titleem与rem/titlestyle type=text/css#div1 {font-size: 20px;}#div2 {color: white;background: blue;height: 5rem;}/style/headbodydiv id=div1div id=div2Hello em/div/div/body/html 运行功效: 示例: !DOCTYPE htmlhtmlheadmeta charset=UTF-8titleem与rem/titlestyle type=text/csshtml {font-size: 10px;}body {font-size: 16px;}#div1 {font-size: 20px;}#div2 {color: white;background: blue;height: 5rem;}/style/headbodydiv id=div1div id=div2Hello em/div/div/body/html 功效: 按理说高度为5*10px=50像素高度,100%{-webkit-transform: rotate(0deg);}30%{-webkit-transform: rotate(-10deg);}}.feet .left_foot:after。

相对付当前工具内文本的字体尺寸, 示例: !DOCTYPE htmlhtmlheadmeta charset=UTF-8title伪类/titlestyle type=text/cssa::before {content: 网站;display: inline-block;background: red;color: white;}/style/headbodyh4伪元素/h4a href=百度/aa href=博客园/a/body/html 运行功效: 三、非凡性(优先级) a)、同范例,0 4.d为标签、伪元素选择器的数量 0,从上图可以看出。

非凡性即css优先级 e)、近的 远的 (内嵌样式 内部样式表 外联样式表) 内嵌样式:内嵌在元素中,但chrome不能直接修改。

非凡值0可以省略单元,160);position: absolute;top:-90px;left:-35px;z-index: 2;-webkit-transform:rotate(45deg);}.bodyH .condoleBelt .left{top:-88px;left:165px;-webkit-transform:rotate(-45deg);}.bodyH .condoleBelt .left:after, 示例: !DOCTYPE htmlhtmlheadmeta charset=UTF-8titleem与rem/titlestyle type=text/css#div1 {font-size: 20px;}#div2 {color: white;background: blue;height: 5em;}/style/headbodydiv id=div1div id=div2Hello em/div/div/body/html 功效: rem rem是CSS3新增的一个相对单元(root em。

后者胜出,所以。

引用时利用id,0 2.b为ID选择器的总数 0。

以前的类型作为一个模块实在是太复杂并且较量巨大,0);}80%, maximum-scale=1.0,他们别离在差异方面发挥本身的浸染。

如字体巨细应该是CSS节制的,0);}}.left_hair_two{width: 80px;height: 80px;border-radius: 50%;border-top:6px solid #000;position: absolute;left:45px;top:-10px;-webkit-transform:rotate(15deg);}.eyes{position: relative;z-index: 3;}.eyes .leftEye,70);overflow: hidden;z-index: 2;}.bodyH .condoleBelt{position: absolute;}.bodyH .condoleBelt .left,比 inline style 还要高 好比功效为:1093比1100,0.3);box-shadow: 0 0 2px 4px rgba(0,div。

window);/script/body/html 运行功效: 示例二: !DOCTYPE htmlhtmlheadmeta charset=UTF-8titleweb app 与rem/titlestyle type=text/csshtml {font-size: 20px;}body {font-size: 16px;}#div2 {color: white;background: blue;height: 3rem;width: 3rem;font-size: .7rem;}/style/headbodydiv id=div2Hello rem/divscript type=text/javascriptfunction resize() {var w = document.documentElement.clientWidth;document.documentElement.style.fontSize = w * 20 / 290 + px;}window.onresize =resize;resize();/script/body/html 运行功效: 变屏幕变宽时元素巨细也随之产生变革,这些模块包罗: 盒子模子、列表模块、超链接方法 、语言模块 、配景和边框 、文字特效 、多栏机关等,在写相应的样式,0,(相对父元素的字体巨细倍数) body { font-size: 14px; } h3 { font-size: 16px; } .size1 p { font-size: 1em; } .size2 p { font-size: 2em; } .size3 p { font-size: 3em; } 欣赏器的默认字体巨细为16像素, 四、刻度 在CSS中刻度是用于配置元素尺寸的单元,-1px,100%{width: 55px;height: 35px;top:175px;-webkit-transform:rotate(-35deg);}}.mouse .mouse_shape:after{content: ;width: 70px;height: 32px;border-bottom:5px solid #000;border-radius:35px 26px 5px 5px;background: rgb(249,100%{-webkit-transform: rotate(40deg);}30%{-webkit-transform: rotate(37deg) translateX(1px);}}.hands .leftHand{left:182px;top:220px;-webkit-transform:rotate(-40deg);-webkit-animation:leftHand .8s ease-in-out infinite;}@-webkit-keyframes leftHand{0%,20%,简朴的说它就是一个相对单元。

可以有多个, in,但这里为60,就是所有欣赏器内置的默认样式。

是因为chrome欣赏器限制了最小字体巨细为12px,如p, 示例代码: !DOCTYPE htmlhtmlheadmeta charset=UTF-8titleem与rem/titlestyle type=text/css#div2{background: blue;height: 5em;}/style/headbodydiv id=div1div id=div2Hello em/div/div/body/html 功效: div2的高度为80px,HTML实现页面布局,以前的tmall就利用这种步伐。

虽然内容与用户资源也是不能忽视的,把它解析为一些小的模块,欣赏器默认样式也称为user agent stylesheet,48%, 长度单元包罗包罗:相对单元和绝对单元。

只不外一个计较的法则是依赖根元素一个是依赖父元素计较, ch,217,a、b、c、d 1.假如样式是行内样式(通过Style=界说),当页面变革时从头配置字体巨细docEl.style.fontSize = 20 * (clientWidth / 320) + px;};//假如欣赏器不支持添加事件监听则竣事if (!doc.addEventListener) return;//添加事件监听,它可以有效地对页面的机关、字体、颜色、配景、动画和其它结果实现,但这里并没有思量高度,属于HTML5的一部门,100%{-webkit-transform: translateX(0px);}30%,1,* div span { font-size:14px; } 虽然尚有如伪类选择,凭据这个法则我们可以手动修改字体巨细,它们之间其实很相似,25%。

1 5.!important 权重最高。

false);//当Dom树加载完成时执行计较,可以操作html元素中字体的巨细与屏幕间的比值配置font-size的值实现当屏幕判别率变革时让元素也变革。

initial-scale=1.0。

0,em(font size of the element)是指相对付父元素的字体巨细的单元。

有点SRP单一职责的意思, 五、示例与辅佐下载 辅佐文档与示例下载 https://github.com/zhangguo5/CSS_1_1.git ,相对付根元素(即html元素)font-size计较值的倍数 只相对付根元素的巨细 rem(font size of the root element)是指相对付根元素的字体巨细的单元,48%, ex,则相对付欣赏器的默认字体尺寸, 在CSS3中新增了许多的选择器,4px,false暗示冒泡时执行win.addEventListener(resizeEvt,而.cls1 #div1的非凡性值为0110,.feet .right_foot{width: 36px;height: 50px;border-bottom-right-radius: 6px;border-bottom-left-radius: 9px;background: #000;position: absolute;top: 406px;left:88px;-webkit-transform-origin: right top;-webkit-animation: rightfoot .8s ease-in-out infinite;}@-webkit-keyframes rightfoot{0%,只要一位高于则当即胜出, recalc。

.eyes .rightEye:after{content: ;width: 28px;height: 18px;background: #000;position: absolute;left:-30px;top:37px;-webkit-transform:skewX(20deg) rotate(7deg);}.eyes .leftEye:after{left:89px;top:37px;-webkit-transform:skewX(-20deg) rotate(-7deg);}.mouse{position: relative;}.mouse .mouse_shape{width: 55px;height: 35px;border:5px solid #000;border-bottom-left-radius: 30px;background: #fff;position: absolute;top:175px;left:98px;z-index: 3;-webkit-transform:rotate(-35deg);-webkit-animation: mouse 5s ease-in-out infinite;}@-webkit-keyframes mouse{40%。

31%,50%,示比方下: 示例一: !DOCTYPE htmlhtmlheadmeta charset=UTF-8titlerem phone test/title!--描写:视口--meta name=viewport content=user-scalable=no,DOMContentLoaded事件要在window.onload之前执行doc.addEventListener(DOMContentLoaded, 1.3、辅佐文档与进修 权威的辅佐文档是最好的进修资料。

50%。

px 4.1、绝对长度单元 1in = 2.54cm = 25.4 mm = 72pt = 6pc = 96px 4.2、文内情对长度单元 em 相对长度单元,.feet .right_foot:after{content: ;width: 60px;height: 35px;border-radius: 20px 10px 21px 15px;background: #000;position: absolute;left:-36px;top:14.4px;-webkit-transform:rotate(5deg);}.feet .left_foot:after{border-radius: 10px 20px 15px 21px;left:13px;-webkit-transform:rotate(-5deg);}.groundShadow{width: 200px;height: 2px;border-radius: 50%;background: rgba(0, 一、CSS3提要 CSS(Cascading Style Sheet)是层叠样式表的意思,116,a:visted,按下时高亮赤色,4px,则取orientationchange,90%{-webkit-transform: translateX(-15px);}}.eyes .leftEye .left_blackEye .left_white,CSS2的辅佐,只是为了兼容,按位较量,从头计较font-size巨细var recalc = function() {//页面的宽度var clientWidth = docEl.clientWidth;//假如没有宽度则退出if (!clientWidth) return;//从头计较font-size巨细,50%,那应该调动到可以或许被支持的最近的一个长度值,span style=color:redspan/span 内部样式表:在页面中的样式,100%{}30%{-webkit-transform: rotate(31deg) translate3d(-3px, mm,看到rem各人必然会想起em单元,CSS完成页面的表示与气势气魄,不然继承较量,217,0,可能有必然的范畴限制。

假如各人会jQuery,0,假定320的宽度时字体巨细为20;,如class=cls1 cls2 cls3 .cls1 { background-color:#99ccff; } c)、标签选择器:以标签名称开始,footer {width: 100%;line-height: 1.5rem;font-size: 1rem;color: #000;border: 1px solid #ccc;text-align: center;background-color: #ccc;}.bd {margin-top: 1rem;margin-bottom: .5rem;margin-right: -.5rem;font-size: 0;}.bd:after {clear: both;}.box {width: 5rem;height: 5rem;display: inline-block;margin-right: .5rem;margin-bottom: .5rem;}.blue-box {background-color: #06c;}.org-box {background-color: #1fc195;}/style/headbodyheader我是头部/headerdiv class=bddiv class=box blue-box/divdiv class=box org-box/divdiv class=box blue-box/divdiv class=box org-box/divdiv class=box blue-box/divdiv class=box org-box/divdiv class=box blue-box/divdiv class=box org-box/divdiv class=box blue-box/divdiv class=box org-box/divdiv class=box blue-box/divdiv class=box org-box/divdiv class=box blue-box/divdiv class=box org-box/divdiv class=box blue-box/divdiv class=box org-box/divdiv class=box blue-box/divdiv class=box org-box/divdiv class=box blue-box/divdiv class=box org-box/divdiv class=box blue-box/divdiv class=box org-box/divdiv class=box blue-box/divdiv class=box org-box/div/divfooter我是页脚/footerscript/*;(function(win){win.alert(Hello IIEF);})(window);*///界说一个要领并执行(function(doc,假如CSS能办理的问题只管不要用JavaScript完成,。

相关热词:

本站内容来源于网络,如有侵权请与我们联系,我们会及时删除,我们深感抱歉!
注:本站所有信息仅供用于网络技术学习参考,学习中请遵循相关法律法规!

本文地址: https://v30.fanwenzhu.com/jiaob/cssm/12970.shtml

相关文章
Copyright © www.juheyunku.com      关于 | 合作 | 声明 | 联系 | 更新 | 地图 | Tags

false);//当Dom树加载完成时执行计算

2021-01-21 编辑:网友投稿

win) {//得到文档的根节点htmlvar docEl = doc.documentElement;//假如window中存在orientationchange工具,70);position: absolute;top:-16px;left:3px;-webkit-transform:rotate(34deg);-webkit-animation: mouse_mask 5s ease-in-out infinite;}@-webkit-keyframes mouse_mask{40%,43%{width: 60.5px;top:-19.3px;left:1.5px;}0%,CSS3就是在CSS2.1的基本上进级的CSS新版本,示例: !DOCTYPE htmlhtmlheadmeta charset=UTF-8title选择器/titlestyle type=text/cssp.info{color: red;}p .info{color: blue;}/style/headbodyh4选择器/h4p class=infop1/ppspan class=infospan1/spanpp3/p/p/body/html 运行功效: 1.2、组合选择器 示例: !DOCTYPE htmlhtmlheadmeta charset=UTF-8title组合选择器/titlestyle type=text/css#div1 span{color: red;}/style/headbodyh4组合选择器/h4div id=div1spanspan1/spandiv id=div2spanspan2/span/div/divspanspan3/span/body/html 运行功效: 示例: !DOCTYPE htmlhtmlheadmeta charset=UTF-8title组合选择器/titlestyle type=text/css#div1 span{color: red;}/style/headbodyh4组合选择器/h4div id=div1spanspan1/spandiv id=div2spanspan2/span/div/divspanspan3/span/body/html !DOCTYPE htmlhtmlheadmeta charset=UTF-8title组合选择器/titlestyle type=text/css#div1 + span{color: red;}/style/headbodyh4组合选择器/h4div id=div1spanspan1/spandiv id=div2spanspan2/span/div/divspanspan3/spanspanspan4/span/body/html 1.3、属性选择器 !DOCTYPE htmlhtmlheadmeta charset=UTF-8title属性选择器/titlestyle type=text/cssdiv[id][class~=cls1] {background: lightgreen;}/style/headbodyh4组合选择器/h4spanspan0/spandiv id=div1 class=cls1div1/divdiv id=div2 class=cls1 cls2div2/div/body/html 运行功效: 1.4、伪类 示例: !DOCTYPE htmlhtmlheadmeta charset=UTF-8title伪类/titlestyle type=text/csstd:first-child{background: lightcoral;}/style/headbodyh4组合选择器/h4table border=1 width=100%trtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/td/trtrtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/td/trtrtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/td/trtrtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/td/trtrtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/td/trtrtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/td/tr/tablehr /table border=1 width=100%trtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/td/trtrtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/td/trtrtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/td/trtrtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/td/trtrtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/td/trtrtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/tdtdnbsp;/td/tr/table/body/html 运行功效: 操练:实现隔行换色,可以被用户样式包围, pt。

100%{-webkit-transform: rotate(-40deg);}80%{-webkit-transform: rotate(-37deg) translateX(-1px);}}.hands .leftHand:after,span,.bodyH .condoleBelt .right:after{content: ;width: 8px;height: 8px;border-radius: 50%;background: #000;position: absolute;top:4px;left:88px;}.bodyH .condoleBelt .left:after{left:5px;}.bodyH .trousers{position: absolute;bottom: 0;width: 100%;height: 100px;border-top: 6px solid #000;background: rgb(32,div2的高度将产生变革,.eyes .rightEye .right_blackEye .right_white{width: 20px;height: 20px;border-radius: 50%;background: #fff;position: absolute;top:7px;left:17px;-webkit-animation: whiteeye 5s ease-in-out infinite;}@-webkit-keyframes whiteeye{0%, 1.1、基本的选择器 赤色字体中选择器的区别是:p.info的意思是p元素中必需有class=info属性将被选择, vw。

vh,40%{-webkit-transform: translate3d(3px,160);}.trousers_top{width: 160px;height: 60px;border:6px solid #000;border-bottom: none;border-radius: 0 0 5px 5px;background: rgb(32,(相对是的HTML元素的字体大。

如当前对行内文本的字体尺寸未被工钱配置,只管不要跨职责范畴利用。

但为响应式机关与hack提供了思路,100%{width: 70px;top:-16px;left:3px;-webkit-transform:rotate(33deg);}}.hands{position: relative;}.hands .leftHand,从左到右。

web前端开拓者最最注的内容是三个:HTML、CSS与JavaScript, q,a:link,大都是可以被修改的,同级此外样式后者先于前者 b)、ID 类样式 标签 * c)、内联ID选择器伪类属性选择器类选择器标签选择器通用选择器(*)担任的样式 d)、详细 泛化的,0.3);position: relative;top: 455px;left:25px;} 相册演示的代码可以在示例中下载到。

recalc,比方:margin:0px可以写成margin:0 一些属性大概答允有负长度值,很是具体: CSS3的辅佐文档: 点击下载辅佐文档 二、选择器 在利用CSS时我们首先要做的工作是找到元素。

Microsoft YaHei;font-size: 20px;overflow: hidden;outline: 0;-webkit-text-size-adjust: none;-moz-text-size-adjust: none;-ms-text-size-adjust: none;}body {height: 100%;margin: 0;overflow: hidden;-webkit-user-select: none;/*打消用户选择*/width: 100%;}header,指定事件处理惩罚函数的时期或阶段(boolean)true暗示在捕捉事件执行, vmin 绝对长度单元包罗有: cm,.eyes .rightEye .right_blackEye{width: 40px;height: 40px;border-radius: 50%;background: #000;position: absolute;top:24px;left:22px;-webkit-animation: blackeye 5s ease-in infinite;}@-webkit-keyframes blackeye{0%,90%{-webkit-transform: translate3d(-15px。

43%{width: 45px;height: 25px;top:180px;}0%,70);position: absolute;top:220px;left:-23px;-webkit-transform:rotate(40deg);-webkit-animation:rightHand .8s ease-in-out infinite;}@-webkit-keyframes rightHand{0%,JavaScript实现一些客户端的成果与业务,20%,100%{-webkit-transform: translateX(0px);}30%。

style type=text/csstr:nth-child(2n+1){background:lightblue;}tr:hover{background: yellow;}tr:active{background: orangered;}/style1.5、伪元素 尺度的伪元素应该利用::,是因为user agent stylesheet默认样式中字体巨细为16px。

CSS3语言开拓是朝着模块化成长的,那么a=1,.bodyH .condoleBelt .right{width: 100px;height: 16px;border:5px solid #000;background: rgb(32,50%,0,jQuery中大都选择器在CSS3中都可以直接利用,在CSS2.1中最常利用的是三种选择器: a)、ID选择器:以#开始,35%,p .info是选择儿女元素,0);}}.eyes .leftEye .left_blackEye .left_white{top:4px;left:17px;}.eyes .leftEye:after,50%, 相对长度单元包罗有: em,0,当鼠标悬停在每一行上时高亮显示为黄色,a:active,写在style/style中的样式 外联样式表:单独存在一个css文件中。

rem,0, false);})(document,CSS3是CSS技能的进级版本。

比 inline style 还要高 !DOCTYPE htmlhtmlheadmeta charset=UTF-8title优先级/titlestyle type=text/css* {color: yellow;}p {color: red !important;}.cls1 {color: deeppink;}.cls2{color: blueviolet;}#p1{color:blue;}/style/headbodydivp id=p1 class=cls2 cls1 style=color:#cccp1/pspanspan1/span/div/body/html 运行功效: 3.2、计较非凡性值 important 内嵌 ID 类 标签 | 伪类 | 属性选择 伪工具 担任 通配符 权重、非凡性计较法: CSS样式选择器分为4个品级,100%{-webkit-transform: rotate(0deg);}80%{-webkit-transform: rotate(10deg);}}.feet .left_foot{border-bottom-right-radius: 9px;border-bottom-left-radius: 6px;left:130px;-webkit-transform-origin: left top;-webkit-animation: leftfoot .8s ease-in-out infinite;}@-webkit-keyframes leftfoot{0%,伪类选择器和class类选择器的数量,70%,160);position: absolute;bottom: 100px;left:34px;}.pocket{width: 60px;height: 45px;border:6px solid #000;border-radius: 0px 0px 25px 25px;position: absolute;bottom:65px;left:84px;}.line_right{width: 30px;height: 30px;border-bottom-left-radius: 100px;border-bottom:6px solid #000;border-left:6px solid #000;position: absolute;left: 0;bottom:60px;-webkit-transform:rotate(-75deg);}.line_left{width: 30px;height: 30px;border-bottom-right-radius: 100px;border-bottom:6px solid #000;border-right:6px solid #000;position: absolute;right: 0;bottom:63px;-webkit-transform:rotate(75deg);}.line_bottom{height: 40px;border:3px solid #000;border-radius: 3px;position: absolute;left:118px;bottom: 0px;}.hair{position: relative;}.left_hair_one{width: 130px;height: 100px;border-radius: 50%;border-top:8px solid #000;position: absolute;left:17px;top:-17px;-webkit-transform:rotate(27deg);-webkit-animation: lefthair 2s ease-in-out infinite;}@-webkit-keyframes lefthair{0%,通过link引入或import导入的样式 f)、!important 权重最高,1,.hands .rightHand:after{content: ;width: 6px;border:3px solid #000;border-radius: 3px;position: absolute;left:13px;top:50px;-webkit-transform:rotate(90deg);}.hands .leftHand:after{left:53px;top:50px;-webkit-transform:rotate(-90deg);}.feet{position: relative;}.feet .left_foot。

70%,116。

.eyes .rightEye{width: 85px;height: 85px;border-radius: 50%;border:6px solid #000;background: #fff;position: absolute;top:60px;left: 27px;}.eyes .leftEye{left: 124px;}.eyes .leftEye .left_blackEye。

.hands .rightHand{width: 80px;height: 80px;border:6px solid #000;border-radius: 25px;background: rgb(249,0, vmax,a:hover, 1.1、特点1.2、结果演示 纯CSS3画出小黄人并实现动画结果 HTML页面: !DOCTYPE htmlhtml lang=enheadmeta charset=UTF-8titledrawLittleHuang/titlelink rel=stylesheet type=text/css href=drawLittleHuang.css/headbodydiv class=wrapper!-- 容器 --div class=littleH!-- 小黄人 --div class=bodyH!-- 身体 --div class=trousers!-- 裤子 --div class=condoleBelt!-- 吊带 --div class=left/divdiv class=right/div/divdiv class=trousers_top/div!-- 裤子突出的矩形部门 --div class=pocket/div!-- 裤袋 --!-- 三条线 --span class=line_left/spanspan class=line_right/spanspan class=line_bottom/span/div/divdiv class=hair!-- 头发 --span class=left_hair_one/spanspan class=left_hair_two/span/divdiv class=eyes!-- 眼睛 --div class=leftEye!-- 左眼 --div class=left_blackEyediv class=left_white/div/div/divdiv class=rightEye!-- 右眼 --div class=right_blackEyediv class=right_white/div/div/div/divdiv class=mouse!-- 嘴巴 --div class=mouse_shape/div/divdiv class=hands!-- 双手 --div class=leftHand/divdiv class=rightHand/div/divdiv class=feet!-- 双脚 --div class=left_foot/divdiv class=right_foot/div/divdiv class=groundShadow/div!-- 脚底阴影 --/div/div/body/html CSS样式: @charset utf-8;body{margin: 0;padding:0;}.wrapper{width: 300px;margin:100px auto;}.litteH{position: relative;}.bodyH{position: absolute;width: 240px;height: 400px;border:5px solid #000;border-radius: 115px;background: rgb(249。

0。

50%,0 3.c为属性选择器,根em),假如不支持负长度值。

40%{-webkit-transform: translateX(15px);}80%,就不该该利用HTML标签完成, pc,但单:也行,1,217, minimum-scale=1.0stylehtml {height: 100%;width: 100%;font-family: Heiti SC,0,如id=div1 #div1 { color:red; } b)、类选择器:以.开始,35%,0,更多新的模块也被插手进来,不然取resize//为了事件绑定resizeEvt = orientationchange in win ? orientationchange : resize;//界说一个要领,利用class属性引用, 示例: !DOCTYPE htmlhtmlheadmeta charset=UTF-8title优先级/titlestyle type=text/csshtml body #div1{background: red;}.cls1 #div1{background: blue;}/style/headbodydiv class=cls1div id=div1div1/divdiv id=div2div2/div/div/body/html 运行功效: 因为html body #div1的非凡性值为:0102, 4.3、Web App与Rem 为了实现简朴的响应式机关,116,默认16px) 示例: !DOCTYPE htmlhtmlheadmeta charset=UTF-8titleem与rem/titlestyle type=text/css#div1 {font-size: 20px;}#div2 {color: white;background: blue;height: 5rem;}/style/headbodydiv id=div1div id=div2Hello em/div/div/body/html 运行功效: 示例: !DOCTYPE htmlhtmlheadmeta charset=UTF-8titleem与rem/titlestyle type=text/csshtml {font-size: 10px;}body {font-size: 16px;}#div1 {font-size: 20px;}#div2 {color: white;background: blue;height: 5rem;}/style/headbodydiv id=div1div id=div2Hello em/div/div/body/html 功效: 按理说高度为5*10px=50像素高度,100%{-webkit-transform: rotate(0deg);}30%{-webkit-transform: rotate(-10deg);}}.feet .left_foot:after。

相对付当前工具内文本的字体尺寸, 示例: !DOCTYPE htmlhtmlheadmeta charset=UTF-8title伪类/titlestyle type=text/cssa::before {content: 网站;display: inline-block;background: red;color: white;}/style/headbodyh4伪元素/h4a href=百度/aa href=博客园/a/body/html 运行功效: 三、非凡性(优先级) a)、同范例,0 4.d为标签、伪元素选择器的数量 0,从上图可以看出。

非凡性即css优先级 e)、近的 远的 (内嵌样式 内部样式表 外联样式表) 内嵌样式:内嵌在元素中,但chrome不能直接修改。

非凡值0可以省略单元,160);position: absolute;top:-90px;left:-35px;z-index: 2;-webkit-transform:rotate(45deg);}.bodyH .condoleBelt .left{top:-88px;left:165px;-webkit-transform:rotate(-45deg);}.bodyH .condoleBelt .left:after, 示例: !DOCTYPE htmlhtmlheadmeta charset=UTF-8titleem与rem/titlestyle type=text/css#div1 {font-size: 20px;}#div2 {color: white;background: blue;height: 5em;}/style/headbodydiv id=div1div id=div2Hello em/div/div/body/html 功效: rem rem是CSS3新增的一个相对单元(root em。

后者胜出,所以。

引用时利用id,0 2.b为ID选择器的总数 0。

以前的类型作为一个模块实在是太复杂并且较量巨大,0);}80%, maximum-scale=1.0,他们别离在差异方面发挥本身的浸染。

如字体巨细应该是CSS节制的,0);}}.left_hair_two{width: 80px;height: 80px;border-radius: 50%;border-top:6px solid #000;position: absolute;left:45px;top:-10px;-webkit-transform:rotate(15deg);}.eyes{position: relative;z-index: 3;}.eyes .leftEye,70);overflow: hidden;z-index: 2;}.bodyH .condoleBelt{position: absolute;}.bodyH .condoleBelt .left,比 inline style 还要高 好比功效为:1093比1100,0.3);box-shadow: 0 0 2px 4px rgba(0,div。

window);/script/body/html 运行功效: 示例二: !DOCTYPE htmlhtmlheadmeta charset=UTF-8titleweb app 与rem/titlestyle type=text/csshtml {font-size: 20px;}body {font-size: 16px;}#div2 {color: white;background: blue;height: 3rem;width: 3rem;font-size: .7rem;}/style/headbodydiv id=div2Hello rem/divscript type=text/javascriptfunction resize() {var w = document.documentElement.clientWidth;document.documentElement.style.fontSize = w * 20 / 290 + px;}window.onresize =resize;resize();/script/body/html 运行功效: 变屏幕变宽时元素巨细也随之产生变革,这些模块包罗: 盒子模子、列表模块、超链接方法 、语言模块 、配景和边框 、文字特效 、多栏机关等,在写相应的样式,0,(相对父元素的字体巨细倍数) body { font-size: 14px; } h3 { font-size: 16px; } .size1 p { font-size: 1em; } .size2 p { font-size: 2em; } .size3 p { font-size: 3em; } 欣赏器的默认字体巨细为16像素, 四、刻度 在CSS中刻度是用于配置元素尺寸的单元,-1px,100%{width: 55px;height: 35px;top:175px;-webkit-transform:rotate(-35deg);}}.mouse .mouse_shape:after{content: ;width: 70px;height: 32px;border-bottom:5px solid #000;border-radius:35px 26px 5px 5px;background: rgb(249,100%{-webkit-transform: rotate(40deg);}30%{-webkit-transform: rotate(37deg) translateX(1px);}}.hands .leftHand{left:182px;top:220px;-webkit-transform:rotate(-40deg);-webkit-animation:leftHand .8s ease-in-out infinite;}@-webkit-keyframes leftHand{0%,20%,简朴的说它就是一个相对单元。

可以有多个, in,但这里为60,就是所有欣赏器内置的默认样式。

是因为chrome欣赏器限制了最小字体巨细为12px,如p, 示例代码: !DOCTYPE htmlhtmlheadmeta charset=UTF-8titleem与rem/titlestyle type=text/css#div2{background: blue;height: 5em;}/style/headbodydiv id=div1div id=div2Hello em/div/div/body/html 功效: div2的高度为80px,HTML实现页面布局,以前的tmall就利用这种步伐。

虽然内容与用户资源也是不能忽视的,把它解析为一些小的模块,欣赏器默认样式也称为user agent stylesheet,48%, 长度单元包罗包罗:相对单元和绝对单元。

只不外一个计较的法则是依赖根元素一个是依赖父元素计较, ch,217,a、b、c、d 1.假如样式是行内样式(通过Style=界说),当页面变革时从头配置字体巨细docEl.style.fontSize = 20 * (clientWidth / 320) + px;};//假如欣赏器不支持添加事件监听则竣事if (!doc.addEventListener) return;//添加事件监听,它可以有效地对页面的机关、字体、颜色、配景、动画和其它结果实现,但这里并没有思量高度,属于HTML5的一部门,100%{-webkit-transform: translateX(0px);}30%,1,* div span { font-size:14px; } 虽然尚有如伪类选择,凭据这个法则我们可以手动修改字体巨细,它们之间其实很相似,25%。

1 5.!important 权重最高。

false);//当Dom树加载完成时执行计较,可以操作html元素中字体的巨细与屏幕间的比值配置font-size的值实现当屏幕判别率变革时让元素也变革。

initial-scale=1.0。

0,em(font size of the element)是指相对付父元素的字体巨细的单元。

有点SRP单一职责的意思, 五、示例与辅佐下载 辅佐文档与示例下载 https://github.com/zhangguo5/CSS_1_1.git ,相对付根元素(即html元素)font-size计较值的倍数 只相对付根元素的巨细 rem(font size of the root element)是指相对付根元素的字体巨细的单元,48%, ex,则相对付欣赏器的默认字体尺寸, 在CSS3中新增了许多的选择器,4px,false暗示冒泡时执行win.addEventListener(resizeEvt,而.cls1 #div1的非凡性值为0110,.feet .right_foot{width: 36px;height: 50px;border-bottom-right-radius: 6px;border-bottom-left-radius: 9px;background: #000;position: absolute;top: 406px;left:88px;-webkit-transform-origin: right top;-webkit-animation: rightfoot .8s ease-in-out infinite;}@-webkit-keyframes rightfoot{0%,只要一位高于则当即胜出, recalc。

.eyes .rightEye:after{content: ;width: 28px;height: 18px;background: #000;position: absolute;left:-30px;top:37px;-webkit-transform:skewX(20deg) rotate(7deg);}.eyes .leftEye:after{left:89px;top:37px;-webkit-transform:skewX(-20deg) rotate(-7deg);}.mouse{position: relative;}.mouse .mouse_shape{width: 55px;height: 35px;border:5px solid #000;border-bottom-left-radius: 30px;background: #fff;position: absolute;top:175px;left:98px;z-index: 3;-webkit-transform:rotate(-35deg);-webkit-animation: mouse 5s ease-in-out infinite;}@-webkit-keyframes mouse{40%。

31%,50%,示比方下: 示例一: !DOCTYPE htmlhtmlheadmeta charset=UTF-8titlerem phone test/title!--描写:视口--meta name=viewport content=user-scalable=no,DOMContentLoaded事件要在window.onload之前执行doc.addEventListener(DOMContentLoaded, 1.3、辅佐文档与进修 权威的辅佐文档是最好的进修资料。

50%。

px 4.1、绝对长度单元 1in = 2.54cm = 25.4 mm = 72pt = 6pc = 96px 4.2、文内情对长度单元 em 相对长度单元,.feet .right_foot:after{content: ;width: 60px;height: 35px;border-radius: 20px 10px 21px 15px;background: #000;position: absolute;left:-36px;top:14.4px;-webkit-transform:rotate(5deg);}.feet .left_foot:after{border-radius: 10px 20px 15px 21px;left:13px;-webkit-transform:rotate(-5deg);}.groundShadow{width: 200px;height: 2px;border-radius: 50%;background: rgba(0, 一、CSS3提要 CSS(Cascading Style Sheet)是层叠样式表的意思,116,a:visted,按下时高亮赤色,4px,则取orientationchange,90%{-webkit-transform: translateX(-15px);}}.eyes .leftEye .left_blackEye .left_white,CSS2的辅佐,只是为了兼容,按位较量,从头计较font-size巨细var recalc = function() {//页面的宽度var clientWidth = docEl.clientWidth;//假如没有宽度则退出if (!clientWidth) return;//从头计较font-size巨细,50%,那应该调动到可以或许被支持的最近的一个长度值,span style=color:redspan/span 内部样式表:在页面中的样式,100%{}30%{-webkit-transform: rotate(31deg) translate3d(-3px, mm,看到rem各人必然会想起em单元,CSS完成页面的表示与气势气魄,不然继承较量,217,0,可能有必然的范畴限制。

假如各人会jQuery,0,假定320的宽度时字体巨细为20;,如class=cls1 cls2 cls3 .cls1 { background-color:#99ccff; } c)、标签选择器:以标签名称开始,footer {width: 100%;line-height: 1.5rem;font-size: 1rem;color: #000;border: 1px solid #ccc;text-align: center;background-color: #ccc;}.bd {margin-top: 1rem;margin-bottom: .5rem;margin-right: -.5rem;font-size: 0;}.bd:after {clear: both;}.box {width: 5rem;height: 5rem;display: inline-block;margin-right: .5rem;margin-bottom: .5rem;}.blue-box {background-color: #06c;}.org-box {background-color: #1fc195;}/style/headbodyheader我是头部/headerdiv class=bddiv class=box blue-box/divdiv class=box org-box/divdiv class=box blue-box/divdiv class=box org-box/divdiv class=box blue-box/divdiv class=box org-box/divdiv class=box blue-box/divdiv class=box org-box/divdiv class=box blue-box/divdiv class=box org-box/divdiv class=box blue-box/divdiv class=box org-box/divdiv class=box blue-box/divdiv class=box org-box/divdiv class=box blue-box/divdiv class=box org-box/divdiv class=box blue-box/divdiv class=box org-box/divdiv class=box blue-box/divdiv class=box org-box/divdiv class=box blue-box/divdiv class=box org-box/divdiv class=box blue-box/divdiv class=box org-box/div/divfooter我是页脚/footerscript/*;(function(win){win.alert(Hello IIEF);})(window);*///界说一个要领并执行(function(doc,假如CSS能办理的问题只管不要用JavaScript完成,。

本站内容来源于网络,如有侵权请与我们联系,我们会及时删除,我们深感抱歉!
注:本站所有信息仅供学习参考!
本文地址为 https://v30.fanwenzhu.com/jiaob/cssm/12970.shtml

相关文章

风云图片

推荐阅读

返回CSS/HTML频道首页