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

武汉做网站网络公司/成都抖音seo

武汉做网站网络公司,成都抖音seo,网站地图制作怎么做,30个无加盟费的项目希望能通过这写这么一个系列的文章来督促和重新学习 css 的知识,也希望能帮助刚踏上前端之路的学弟学妹们全面一些的学习css知识,这个系列主要是从 css 的 api 的翻译笔记 css Api 文档 :disabled :disable伪类主要是用来选取被禁用的元素,一个元素被禁用…

希望能通过这写这么一个系列的文章来督促和重新学习 css 的知识,也希望能帮助刚踏上前端之路的学弟学妹们全面一些的学习css知识,这个系列主要是从 css 的 api 的翻译笔记 css Api 文档

:disabled

:disable伪类主要是用来选取被禁用的元素,一个元素被禁用就代表着这个元素不能被激活(即不能被选中,点击,不能当作表单使用)或则被聚焦。当然这个元素也有能被激活的状态,也就是说这个元素能被激活或则被聚焦。

栗子

 input:disabled选择所有被禁用掉的表单select.country:disabled选择一个类名叫做 `country`的被禁用掉的元素

css

 input[type="text"]:disabled { background: #ccc; }

HTML 5

<form action="#"><fieldset><legend>Shipping address</legend><input type="text" placeholder="Name"><input type="text" placeholder="Address"><input type="text" placeholder="Zip Code"></fieldset><fieldset id="billing"><legend>Billing address</legend><label for="billing_is_shipping">Same as shipping address:</label><input type="checkbox" onchange="javascript:toggleBilling()" checked><br /><input type="text" placeholder="Name" disabled><input type="text" placeholder="Address" disabled><input type="text" placeholder="Zip Code" disabled></fieldset>
</form>

:empty

The :empty pseudo-class represents any element that has no children at all. Only element nodes and text (including whitespace) are considered. Comments or processing instructions do not affect whether an element is considered empty or not.

:empty伪类能选取空内容的元素,只有节点和文本(空格也算文本),被认为子元素。类似注释这种不会影响元素的可以被视为是空内容

 语法<element>:empty { /* style properties */ }Examples.box {background: red;height: 200px;width: 200px;}    .box:empty {background: lime;}<div class="box"><!-- I will be lime --></div><div class="box">I will be red</div><div class="box"><!-- I will be red because of the whitespace around this comment --></div>

:enabled

The :enabled CSS pseudo-class represents any enabled element. An element is enabled if it can be activated (e.g. selected, clicked on or accept text input) or accept focus. The element also has an disabled state, in which it can't be activated or accept focus.

:enabled伪类,可以选择任何可用的元素,可用的元素就是能被激活的元素,(可以被选中,点击或则像输入框一样)接受聚焦,这类元素一般也有一个不可用的状态(disabled),不可用状态下,元素不可被激活,或接受聚焦

Example

下面的代码会给可用元素加上一个绿色的背景,给不可用的元素加上一个灰色的背景。

<form action="url_of_form"><label for="FirstField">First field (enabled):</label> <input type="text" id="FirstField" value="Lorem"><br /><label for="SecondField">Second field (disabled):</label> <input type="text" id="SecondField" value="Ipsum" disabled="disabled"><br /><input type="button" value="Submit" />
</form>
input:enabled {color: #22AA22;
}
input:disabled {color: #D9D9D9;
}

:first

这个:first伪类,能够选择打印文档的第一页

Note: 使用这个选择器,你不能改变所有的 CSS 属性,你只能改 margin,orphan,window,以及分页,其他属性的书性值,将会被忽略

栗子
Examples@page :first {margin: 2in 3in;
} 

:first-child

:first-child伪类,能够选择元素的父元素的第一个子元素

语法
element:first-child { /* style properties */ }
Examples

栗子1

HTML <div><span>This span is limed!</span><span>This span is not. :(</span>
</div>CSS span:first-child {background-color: lime;
}

栗子2

HTML <ul><li>List 1</li><li>List 2</li><li>List 3</li>
</ul>
CSS li{color:red;
}
li:first-child{color:green;
}

:first-of-type

:first-of-type伪类选择器,能够选择父元素的子元素中,同种元素类型的第一个元素

语法

element:first-of-type { /* style properties */ }

栗子

div :first-of-type {background-color: lime;
}
<div><span>This span is first!</span><span>This span is not. :(</span><span>what about this <em>nested element</em>?</span><strike>This is another type</strike><span>Sadly, this one is not...</span>
</div>

:focus

:focus伪类选择器,只有在元素被光标聚焦的时候才能选择到元素,无论用户时通过鼠标还是键盘操作,只要能让元素获取光标,就能选择到元素

语法

element:focus { ... }

栗子

.first-name:focus {color: red;
}.last-name:focus {color: lime;
}<input class="first-name" value="I'll be red when focused">
<input class="last-name" value="I'll be lime when focused">
http://www.jmfq.cn/news/5297905.html

相关文章:

  • 公司网站现状/seo168小视频
  • 厦门电子网站建设/经典网络营销案例
  • 网站产品图怎么做/seo网站平台
  • 英文成品网站模板下载/东莞seo外包公司哪家好
  • 专业做网站的团队/竞价恶意点击器
  • 邵阳网站建设多少钱/seo关键词优化经验技巧
  • 哪些网站用c 做的/站长工具视频
  • 做百度网站每年的费用多少钱/廊坊seo优化排名
  • 赌博网站做代理微信群卖房卡/有创意的营销策划案例
  • wordpress建站方法/seo顾问服务福建
  • 网页设计实验报告步骤/appstore关键词优化
  • 郑州电商公司排名前十有哪些/seo常用方法
  • 沈阳制作网站的公司有哪些/如何建立个人网址
  • 陕西省建设教育培训中心网站/云盘搜索
  • 苏州网站建设设计制作公司怎么样/外包平台
  • 广州 餐饮 网站建设/百度文库账号登录入口
  • 企业电子商务网站建设规划方案/seo网站优化教程
  • 梅州市网站制作/互联网营销师
  • 做网站在哪里做/电商引流推广方法
  • 如何做自己的网站系统/种子搜索器
  • 哈尔滨网站托管/html家乡网站设计
  • php做网站有哪些优点/小红书seo优化
  • 西宁网站建设公司排行/购物网站有哪些
  • 用jsp做网站的体会/企业营销模式
  • 注册网站邮箱发送的验证网页无法打开/最新百度新闻
  • 男和女做暖暖网站/网络营销方式有哪些?
  • 做网站最主要是什么/芜湖seo
  • 网站制作公司如何运作/国内新闻大事20条简短
  • 西班牙语网站建设/关键词查找网站
  • 怎样做网站教程/服装市场调研报告