In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the knowledge of "how CSS uses pseudo-classes to control the length of borders". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
What is used here is written by WeChat Mini Programs, so the tag will be view and does not conflict with html.
Html:
Helmet monitoring
Hazardous area monitoring
Css:
. swiper-tab {
Width: 100%
Font-family: PingFangSC-Medium
Font-size: 28rpx
Border-bottom: 2rpx solid # F1F1F1
Text-align: center
Height: 88rpx
Line-height: 88rpx
Display: flex
Flex-flow: row
Justify-content: space-between
Background: # ffffff
}
.swiper-tab-item {
Width: 50%
Color: # 252627
}
.active {
Color: # 4876F9
Font-weight: bold
Position: relative
}
The above are the basic styles of the page. To control the length of the border, you need to use: after
Pseudo class css:
.active: after {
Content:''
Position: absolute
Bottom: 0
Height: 6rpx
Width: 100rpx
Background-color: # 4876F9
Left: 50%
Transform: translateX (- 50%)
}
The last two sentences are the problem of controlling the center of the frame.
That's all for "how CSS uses pseudo-classes to control border length". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 291
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.