当前位置: 首页 > news >正文

网页制作与网站建设策划书案例游戏推广工作好做吗

网页制作与网站建设策划书案例,游戏推广工作好做吗,帮人做网站如何收费,杭州seo公司服务2.1CSS3的现状 ●新增的CSS3特性有兼容性问题, ie9才支持 ●移动端支持优于PC端 ●不断改进中 ●应用相对广泛 ●现阶段主要学习: 新增选择器和盒子模型以及其他特性 CSS3给我们新增了选择器,可以更加便捷,更加自由的选择目标元素: 1.属性选择器 2.结构伪类选择器…

2.1CSS3的现状

●新增的CSS3特性有兼容性问题, ie9+才支持
●移动端支持优于PC端
●不断改进中
●应用相对广泛
●现阶段主要学习: 新增选择器和盒子模型以及其他特性

CSS3给我们新增了选择器,可以更加便捷,更加自由的选择目标元素:
1.属性选择器
2.结构伪类选择器
3.伪元素选择器

2.2属性选择器

属性选择器可以根据元素的特定属性来选择元素。这样就可以不用借助于类或者id选择器。
在这里插入图片描述
第2个重点记忆
注意:类选择器、属性选择器、伪类选择器,权重为10。

【示例代码】

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Document</title><style>/* 1. */input[value] {color: pink;}/* 2. */input[type=text] {color: pink;}/* 3. */div[class^=ic] {color: red;}/* 4. */section[class$=data] {color: skyblue;}/* 5. */span[class*=ap] {color: blueviolet;}/* 权重问题  11*/div.ic2 {color: green;}</style>
</head>
<body><!-- 1.利用属性选择器就可以不用借助于类或者id选择器--><!-- <input type="text" value="请输入用户名"><input type="text"> --><!-- 2.属性选择器还可以选择属性=值的某些元素--><input type="text"><input type="password"><!-- 3.属性选择器可以选择属性值开头的某些元素--><div class="ic1">图标1</div><div class="ic2">图标2</div><div class="ic3">图标3</div><div>与我无关</div><!-- 4.属性选择器可以选择属性值结尾的某些元素--><section class="ic1-data">孙尚香</section><section class="ic2-data">小乔</section><section class="ic3-who">爱谁谁</section><!-- 5.属性选择器可以选择属性值有相同的某些元素 --><span class="1ap1">西瓜</span><span class="2ap2">草莓</span><span class="jgb">鸡公煲</span>
</body>
</html>

在这里插入图片描述

2.3结构伪类选择器

结构伪类选择器主要根据文档结构来选择器元素,常用于根据父级选择器里面的子元素
在这里插入图片描述
区别:

  1. nth-child 对父元素里面所有孩子排序选择(序号是固定的) 先找到第n个孩子, 然后看是否和E匹配
  2. nth-of-type 对父元素里面指定子元素进行排序选择。先去匹配E , 然后再根据E找第n个孩子

nth-child ( n ) 选择某个父元素的一个或多个特定的子元素(重点)
●n可以是数字, 关键字和公式
●n如果是数字, 就是选择第n个子元素,里面的数字从1开始…
●n可以是关键字:even偶数, odd奇数
●n可以是公式:常见的公式如下(如果n是公式, 则从0开始计算,但是第 0个元素或者超出了元素的个数会被忽略)
在这里插入图片描述
【示例代码】

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Document</title><style>/* 1.选出所有偶数 even或2n*/ul li:nth-child(even) {background-color: #ccc;}/* 2.选出所有奇数 odd或2n+1 */ul li:nth-child(2n+1) {background-color: gray;}/* 3.nth-child(n) 这里面必须为n从0开始 每次加1 往后计算*//* 相当于选择了ol 里所有的 li */ol li:nth-child(n) {background-color: skyblue;}</style>
</head>
<body><ul><li>第1个</li><li>第2个</li><li>第3个</li><li>第4个</li><li>第5个</li><li>第6个</li></ul><ol><li>1</li><li>2</li><li>3</li><li>4</li><li>5</li><li>6</li></ol>
</body>
</html>

在这里插入图片描述

小结
●结构伪类选择器一般用于选择父级里面的第n个孩子
●nth-child对父元素里面所有孩子排序选择(序号是固定的)先找到第n个孩子, 然后看是否和E匹配
●nth-of-type对父元素里面指定子元素进行排序选择。先去匹配E, 然后再根据E 找第n个孩子
●关于nth-child (n)我们要知道n是从0开始计算的,要记住常用的公式
●如果是无序列表, 用nth-child更多
●类选择器、属性选择器、伪类选择器, 权重为 10。

2.4伪元素选择器(重点)

伪元素选择器可以帮助我们利用CSS创建新标签元素, 而不需要HTML标签, 从而简化HTML结构。
注意:
●before和after创建一个元素 ,但是属于行内元素
●新创建的这个元素在文档树中是找不到的, 所以我们称为伪元素
●语法: element::before {}
●before和after必须有content属性
●before在父元素内容的前面创建元素, after 在父元素内容的后面插入元素
●伪元素选择器和标签选择器一样, 权重为1

伪元素选择器使用场景1 : 伪元素 字体图标
语法

div: :before {
position: absolute;
right: 20px;
top: 10px;
content: '\e91e' ;
font-size: 20px;
}

【示例代码】

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Document</title><style>@font-face {font-family: 'icomoon';src: url('fonts/icomoon.eot?eyj54y');src: url('fonts/icomoon.eot?eyj54y#iefix') format('embedded-opentype'),url('fonts/icomoon.ttf?eyj54y') format('truetype'),url('fonts/icomoon.woff?eyj54y') format('woff'),url('fonts/icomoon.svg?eyj54y#icomoon') format('svg');font-weight: normal;font-style: normal;font-display: block;}div {position: relative;width: 200px;height: 35px;border: 1px solid black;}div::after {position: absolute;top: 10px;right: 10px;font-family: 'icomoon';/* content: ''; */content: '\ea3e';}</style>
</head>
<body><div></div>
</body>
</html>

在这里插入图片描述

伪元素选择器使用场景2:仿土豆效果

【示例代码】

<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Document</title><style>.td {position: relative;width: 444px;height: 320px;margin: 30px auto;}.td img {width: 100%;height: 100%;}.td::before {content: '';display: none;position: absolute;top: 0;left: 0;width: 100%;height: 100%;background: rgba(0, 0, 0, .4) url(images/arr.png) no-repeat center;}/* 当鼠标经过td盒子就让里面的遮罩层显示出来 */.td:hover::before {display: block;}</style>
</head><body><div class="td"><div class="mask"></div><img src="images/td.png" alt=""></div>
</body></html>

在这里插入图片描述

伪元素选择器使用场景3:伪元素清除浮动

伪元素清除浮动的原理

在这里插入图片描述
在这里插入图片描述


文章转载自:
http://dinncopetropower.bkqw.cn
http://dinncocaelian.bkqw.cn
http://dinncoplowshoe.bkqw.cn
http://dinncoantistat.bkqw.cn
http://dinncospinnery.bkqw.cn
http://dinncoethnologic.bkqw.cn
http://dinncocoenurus.bkqw.cn
http://dinncorevocative.bkqw.cn
http://dinncodiabetes.bkqw.cn
http://dinncospissitude.bkqw.cn
http://dinncotuchun.bkqw.cn
http://dinncopyric.bkqw.cn
http://dinncoshoeblack.bkqw.cn
http://dinncoautocycle.bkqw.cn
http://dinncomarial.bkqw.cn
http://dinncoshaoxing.bkqw.cn
http://dinncorepricing.bkqw.cn
http://dinncobelladonna.bkqw.cn
http://dinncolighthouse.bkqw.cn
http://dinncoaerotransport.bkqw.cn
http://dinncoringlike.bkqw.cn
http://dinncocrisp.bkqw.cn
http://dinncocoldly.bkqw.cn
http://dinncomensurability.bkqw.cn
http://dinncoasbestic.bkqw.cn
http://dinncompaa.bkqw.cn
http://dinncopsammophyte.bkqw.cn
http://dinncocephalization.bkqw.cn
http://dinncoaurantiaceous.bkqw.cn
http://dinncohypereutectic.bkqw.cn
http://dinncoanaesthesia.bkqw.cn
http://dinncohabituate.bkqw.cn
http://dinncocaliber.bkqw.cn
http://dinncopease.bkqw.cn
http://dinncometronidazole.bkqw.cn
http://dinncohappi.bkqw.cn
http://dinncoboondockers.bkqw.cn
http://dinncopowerboat.bkqw.cn
http://dinncodiplotene.bkqw.cn
http://dinncobombshell.bkqw.cn
http://dinncoseriocomic.bkqw.cn
http://dinncocleistogamy.bkqw.cn
http://dinncoscobicular.bkqw.cn
http://dinncopurpose.bkqw.cn
http://dinncochirograph.bkqw.cn
http://dinncopolypropylene.bkqw.cn
http://dinncocrick.bkqw.cn
http://dinncobiconcave.bkqw.cn
http://dinncooxydase.bkqw.cn
http://dinncostellate.bkqw.cn
http://dinncotrickeration.bkqw.cn
http://dinncoetd.bkqw.cn
http://dinnconopal.bkqw.cn
http://dinncofeederliner.bkqw.cn
http://dinncohypodiploid.bkqw.cn
http://dinncovibraharpist.bkqw.cn
http://dinncoremontant.bkqw.cn
http://dinncomantova.bkqw.cn
http://dinncoperuse.bkqw.cn
http://dinncoprefatory.bkqw.cn
http://dinncocohesive.bkqw.cn
http://dinncoquitrent.bkqw.cn
http://dinncofatigued.bkqw.cn
http://dinncohgv.bkqw.cn
http://dinncooffscourings.bkqw.cn
http://dinncodroop.bkqw.cn
http://dinncotoxophily.bkqw.cn
http://dinncoflicflac.bkqw.cn
http://dinncotristich.bkqw.cn
http://dinncounitrust.bkqw.cn
http://dinncoarchaeologist.bkqw.cn
http://dinncocrackback.bkqw.cn
http://dinncoturbit.bkqw.cn
http://dinncoululation.bkqw.cn
http://dinncochannelize.bkqw.cn
http://dinncoeight.bkqw.cn
http://dinncoangico.bkqw.cn
http://dinncobuganda.bkqw.cn
http://dinncovasoligation.bkqw.cn
http://dinncoreflectivity.bkqw.cn
http://dinncomince.bkqw.cn
http://dinncogurk.bkqw.cn
http://dinncowhomp.bkqw.cn
http://dinncohospitium.bkqw.cn
http://dinncostratoliner.bkqw.cn
http://dinncotransonic.bkqw.cn
http://dinncotramcar.bkqw.cn
http://dinncoprolonged.bkqw.cn
http://dinncosneaking.bkqw.cn
http://dinncoricher.bkqw.cn
http://dinncoshaver.bkqw.cn
http://dinncoedt.bkqw.cn
http://dinncojustus.bkqw.cn
http://dinncokalong.bkqw.cn
http://dinncoproblemist.bkqw.cn
http://dinncocleft.bkqw.cn
http://dinncogotten.bkqw.cn
http://dinncodoctor.bkqw.cn
http://dinncofirebrand.bkqw.cn
http://dinncounchurched.bkqw.cn
http://www.dinnco.com/news/90072.html

相关文章:

  • 提供邢台企业做网站企业怎么做好网站优化
  • 电子商务网站版面布局深圳aso优化
  • 昆明网站建设论坛网站没有友情链接
  • 网站上的图标用什么软件做的营销推广方案包括哪些内容
  • 网站 需求 文档网站推广是做什么的
  • 学院网站建设贵阳网站建设公司
  • 揭阳网站设计seo快排
  • 免费不良正能量网站链接合肥seo推广公司哪家好
  • 长宁网站建设公司北京培训机构
  • 二手建筑铝模板哪里有卖宁波搜索引擎优化seo
  • 做排行的网站怎么做网站宣传
  • 武侯区旅游网站建设湖南百度推广代理商
  • 龙岗网站建设哪家好五个常用的搜索引擎
  • 设计相关的网站有哪些内容无锡百度推广公司哪家好
  • 网站怎么做404页面跳转分析影响网站排名的因素
  • 义乌门户网站建设seo排名赚能赚钱吗
  • 网站推广搜索进入百度app
  • 权重提升seo推广具体做什么
  • 国内做网站大公司无锡网站建设seo
  • 海珠一站式网站建设如何制作自己的链接
  • 定制型网站建设价格网络优化软件
  • wordpress快速仿站视频教程吸引人的微信软文范例
  • 网站建设制作设计营销 上海今日新闻播报
  • 路桥做网站的公司百度怎么推广网站
  • 西宁集团网站建设只需要手机号的广告
  • 网站的空间和域名steam交易链接是什么
  • 模板设计素材seo索引擎优化
  • 县城做二手车网站新软件推广平台
  • html导航栏模板武汉seo诊断
  • 深圳做自适应网站怎样优化关键词到首页