当前位置:网站首页>id选择器和类选择器的区别
id选择器和类选择器的区别
2022-07-05 19:36:00 【叼个小孩尝尝鲜】
1、ID选择器
ID选择器使用#进行标识,后年紧跟ID名
语法:
ID选择器
id名{属性名1:属性值1;属性名2:属性值2;属性名3;属性值3;}
标签
< p id=“id名”>< /p>
元素的ID值是唯一的,只能对应于文档中某一个元素。
用法基本和类选择器相同
2、ID选择器和类选择器的区别
w3c标准规定,在同一个页面内容中,不允许有相同名字的id对象出现,但是允许相同相同名字的class
类选择器(class)好比人的名字,,可以多次使用
ID选择器好比人的身份证号,全中国是唯一的,不得重复
边栏推荐
- 使用 RepositoryProvider简化父子组件的传值
- Mysql如何对json数据进行查询及修改
- C#应用程序界面开发基础——窗体控制(6)——菜单栏、工具栏和状态栏控件
- S7-200SMART利用V90 MODBUS通信控制库控制V90伺服的具体方法和步骤
- What is the core value of testing?
- 【obs】libobs-winrt :CreateDispatcherQueueController
- Get wechat avatar and nickname with uniapp
- 【obs】libobs-winrt :CreateDispatcherQueueController
- 什么是面上项目
- 618“低调”谢幕,百秋尚美如何携手品牌跨越“不确定时代”?
猜你喜欢

webuploader文件上传 拖拽上传 进度监听 类型控制 上传结果监听控件

Explain in detail the functions and underlying implementation logic of the groups sets statement in SQL
Successful entry into Baidu, 35K monthly salary, 2022 Android development interview answer

通过POI追加数据到excel中小案例

Force buckle 1200 Minimum absolute difference

After the company went bankrupt, the blackstones came

#夏日挑战赛#数据库学霸笔记,考试/面试快速复习~

Teach you to deal with JS reverse picture camouflage hand in hand
![[AI framework basic technology] automatic derivation mechanism (autograd)](/img/9c/a5713def131dc7643cc19b3839ff0c.png)
[AI framework basic technology] automatic derivation mechanism (autograd)

众昂矿业:2022年全球萤石行业市场供给现状分析
随机推荐
Oracle故障处理:Ora-10873:file * needs to be either taken out of backup or media recovered
[Collection - industry solutions] how to build a high-performance data acceleration and data editing platform
redis集群模拟消息队列
Ten years at sea: old and new relay, dark horse rising
Password reset of MariaDB root user and ordinary user
Android interview, Android audio and video development
爬虫练习题(二)
全网最全的低代码/无代码平台盘点:简道云、伙伴云、明道云、轻流、速融云、集简云、Treelab、钉钉·宜搭、腾讯云·微搭、智能云·爱速搭、百数云
Force buckle 1200 Minimum absolute difference
MMO項目學習一:預熱
大厂面试必备技能,2022Android不死我不倒
40000 word Wenshuo operator new & operator delete
JAD的安装、配置及集成IDEA
Is it safe for Guohai Securities to open an account online?
Debezium系列之:IDEA集成词法和语法分析ANTLR,查看debezium支持的ddl、dml等语句
How to apply smart contracts more wisely in 2022?
acm入门day1
Explain in detail the functions and underlying implementation logic of the groups sets statement in SQL
Go语言学习教程(十六)
司空见惯 - 英雄扫雷鼠