当前位置:网站首页>:last-child 不生效解决
:last-child 不生效解决
2022-07-02 21:32:00 【小白目】
结构:
<div class="titleContent">
<div>导航点击栏</div>
<p>{
{ AthenaData.titleLabel }}</p>
<h1>牌力觉醒 等你来斗</h1>
<p>翻牌得门票,参赛赢好礼!</p>
<div class="ticketInfo">
我的入场券
<span>初赛:1</span>
<span>复赛:0</span>
<span>决赛:0</span>
<button>立即开斗</button>
</div>
</div>想给 <p>翻牌得门票,参赛赢好礼!</p> 文字加粗:
样式:
p:last-child{
font-weight: 700;
}
发现不生效。
解决办法:
p:last-of-type{
font-weight: 700;
}总结:
p:first-of-type :同级结构内首次出现的P元素(无须在结构第一位)
p:last-of-type :同级结构内最后出现的P元素(无须在结构倒数第一位)
p:first-child :父元素下的第一个P元素(必须在结构第一位)
p:last-child :父元素(body除外)下的最后一个P元素(必须在结构倒数第一位)
边栏推荐
- ~90z axis translation
- [shutter] statefulwidget component (bottom navigation bar component | bottomnavigationbar component | bottomnavigationbaritem component | tab switching)
- Research Report on market supply and demand and strategy of Chinese garden equipment industry
- Research Report on micro vacuum pump industry - market status analysis and development prospect prediction
- China Indonesia advanced wound care market trend report, technological innovation and market forecast
- VIM command-t plugin error: unable to load the C extension - VIM command-t plugin error: could not load the C extension
- Technical solution of vision and manipulator calibration system
- AES encryption CBC mode pkcs7padding filling Base64 encoding key 32byte iv16byte
- China's log saw blade market trend report, technological innovation and market forecast
- Cloud computing technology [1]
猜你喜欢
![[shutter] shutter layout component (Introduction to layout component | row component | column component | sizedbox component | clipoval component)](/img/45/735431f59a84e9554225a72a551ab8.jpg)
[shutter] shutter layout component (Introduction to layout component | row component | column component | sizedbox component | clipoval component)

读博士吧,研究奶牛的那种!鲁汶大学 Livestock Technology 组博士招生,牛奶质量监测...

Check the confession items of 6 yyds

Spend more time with your computer on this special holiday, HHH

Browser - clean up the cache of JS in the page

How do I access the kubernetes API?

Image segmentation using pixellib

Basic knowledge of tree and binary tree (detailed illustration)

Huawei Hongmeng watch achieves fireworks display effect on New Year's Eve

PIP version update timeout - download using domestic image
随机推荐
Research Report on ranking analysis and investment strategic planning of RFID market competitiveness of China's industrial manufacturing 2022-2028 Edition
Research Report on micro gripper industry - market status analysis and development prospect prediction
The neo4j skill tree was officially released to help you easily master the neo4j map database
China's Micro SD market trend report, technology dynamic innovation and market forecast
[C language] [sword finger offer article] - replace spaces
[shutter] shutter layout component (physicalmodel component)
Construction and maintenance of business websites [10]
Basic IO interface technology - microcomputer Chapter 7 Notes
Research Report on market supply and demand and strategy of China's plastic pump industry
Micro SD Card Industry Research Report - market status analysis and development prospect forecast
暑期第一周总结
Welfare, let me introduce you to someone
MySQL learning record (3)
MySQL installation failed -gpg verification failed
MySQL learning record (2)
2019 Nanchang (relive the classic)
Import a large amount of data to redis in shell mode
Spend more time with your computer on this special holiday, HHH
[CV] Wu Enda machine learning course notes | Chapter 12
VIM command-t plugin error: unable to load the C extension - VIM command-t plugin error: could not load the C extension