当前位置:网站首页>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选择器好比人的身份证号,全中国是唯一的,不得重复
边栏推荐
- 手机开户选择哪家券商公司比较好哪家平台更安全
- Fuzor 2020 software installation package download and installation tutorial
- 面试官:Redis中集合数据类型的内部实现方式是什么?
- Worthy of being a boss, byte Daniel spent eight months on another masterpiece
- Summer Challenge database Xueba notes, quick review of exams / interviews~
- Zhongang Mining: analysis of the current market supply situation of the global fluorite industry in 2022
- ELK分布式日志分析系统部署(华为云)
- Debezium系列之:postgresql从偏移量加载正确的最后一次提交 LSN
- 【obs】libobs-winrt :CreateDispatcherQueueController
- 40000 word Wenshuo operator new & operator delete
猜你喜欢

Go语言 | 03 数组、指针、切片用法
MySql中的longtext字段的返回问题及解决

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

How about testing outsourcing companies?

建议收藏,我的腾讯Android面试经历分享

使用 RepositoryProvider简化父子组件的传值

5 years of experience, 27 days of Android programmer interview, 2022 programmer advanced classic

集合

618“低调”谢幕,百秋尚美如何携手品牌跨越“不确定时代”?
Mysql如何对json数据进行查询及修改
随机推荐
Millimeter wave radar human body sensor, intelligent perception of static presence, human presence detection application
Hiengine: comparable to the local cloud native memory database engine
Oracle故障处理:Ora-10873:file * needs to be either taken out of backup or media recovered
Tutoriel de téléchargement et d'installation du progiciel fuzor 2020
How MySQL queries and modifies JSON data
UWB超宽带定位技术,实时厘米级高精度定位应用,超宽带传输技术
Is it safe for Guohai Securities to open an account online?
PG basics -- Logical Structure Management (user and permission management)
The problem of returning the longtext field in MySQL and its solution
【硬核干货】数据分析哪家强?选Pandas还是选SQL
Mariadb root用户及普通用户的密码 重置
HiEngine:可媲美本地的云原生内存数据库引擎
IBM大面积辞退40岁+的员工,掌握这十个搜索技巧让你的工作效率至上提高十倍
城链科技数字化创新战略峰会圆满召开
JAD的安装、配置及集成IDEA
Decision tree and random forest
What are general items
Can Leica capture the high-end market offered by Huawei for Xiaomi 12s?
How to choose the notion productivity tools? Comparison and evaluation of notion, flowus and WOLAI
IBM has laid off 40 + year-old employees in a large area. Mastering these ten search skills will improve your work efficiency ten times