css - 扩大元素的点击区域_个人文章 - SegmentFault 思否
问题背景有时候我们在做移动端业务的开发时,会遇到这样的问题:我们按照UI设计稿画好了页面,但是在验收功能时,发现在小屏幕手机上有些按钮不好点击,可是UI同学又不希望我们调整按钮的大小,破坏了他的设计。
顺晟科技
2021-09-21 13:13:31
138
/html/body/div
html>body>div
//div//p
div>p
div p
//div/*
div>*
//b[@class='a']
.a
//*[@style='color']
[style='color']
//*[contains(@a,'b')]
[a*='b']
//*[starts-with(@a,'b')]
[a^='b']
//*[ends-with(@a,'b')]
[a$='b']
d[a*='a1'][b^='b1'][c$='c1']
//div/p[2]
div p:nth-child(2)
//div/*[2]
div :nth-child(2)
//p[last()-1]
p:nth-last-child(2)
a p:nth-of-type(n)
a p:nth-last-of-type(n)
a p:nth-of-type(n)
a :nth-child(even)
a p:nth-of-type(even)
a p:nth-of-type(even)
//option[position()<=2]
//*[@class='a']/*[position()<=3]
//*[@class='a']/*[position()>=last()-2]
//*[@class='a'] | //*[@id='b']
.a , #b
//a/../..
//*[@class='a']/following-sibling::*
.a ~ *
//*[@class='a']/preceding-sibling::*
31
2022-10
05
2022-10
15
2022-09
15
2022-09
15
2022-09
15
2022-09