当前位置:网站首页>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选择器好比人的身份证号,全中国是唯一的,不得重复
边栏推荐
- Oracle fault handling: ora-10873:file * needs to be either taken out of backup or media recovered
- Worthy of being a boss, byte Daniel spent eight months on another masterpiece
- How to apply smart contracts more wisely in 2022?
- Necessary skills for interview in large factories, 2022android will not die, I will not fall
- Fundamentals of shell programming (Part 8: branch statements -case in)
- PHP uses ueditor to upload pictures and add watermarks
- IFD-x 微型红外成像仪(模块)关于温度测量和成像精度的关系
- 【C语言】字符串函数及模拟实现strlen&&strcpy&&strcat&&strcmp
- 打新债在哪里操作开户是更安全可靠的呢
- Postman核心功能解析-参数化和测试报告
猜你喜欢
MMO項目學習一:預熱
【合集- 行业解决方案】如何搭建高性能的数据加速与数据编排平台
Ten years at sea: old and new relay, dark horse rising
MMO project learning 1: preheating
通过POI追加数据到excel中小案例
#夏日挑战赛#数据库学霸笔记,考试/面试快速复习~
The city chain technology Digital Innovation Strategy Summit was successfully held
word如何转换成pdf?word转pdf简单的方法分享!
Successful entry into Baidu, 35K monthly salary, 2022 Android development interview answer
Mysql如何对json数据进行查询及修改
随机推荐
Common interview questions in Android, 2022 golden nine silver ten Android factory interview questions hit
Vagrant2.2.6 supports virtualbox6.1
不愧是大佬,字节大牛耗时八个月又一力作
四万字长文说operator new & operator delete
手机开户选择哪家券商公司比较好哪家平台更安全
S7-200SMART利用V90 MODBUS通信控制库控制V90伺服的具体方法和步骤
Can Leica capture the high-end market offered by Huawei for Xiaomi 12s?
Go语言 | 02 for循环及常用函数的使用
word如何转换成pdf?word转pdf简单的方法分享!
[hard core dry goods] which company is better in data analysis? Choose pandas or SQL
软件测试工程师是做什么的?待遇前景怎么样?
JS solution force deduction daily question (12) - 556 Next larger element III (2022-7-3)
What are the reliable domestic low code development platforms?
Teach you to deal with JS reverse picture camouflage hand in hand
MMO项目学习一:预热
【C语言】字符串函数及模拟实现strlen&&strcpy&&strcat&&strcmp
测试的核心价值到底是什么?
How MySQL queries and modifies JSON data
建议收藏,我的腾讯Android面试经历分享
#夏日挑战赛#数据库学霸笔记,考试/面试快速复习~