In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you how css uses span tags to set the font color of some text in div. I hope you will get something after reading this article. Let's discuss it together.
Use the span tag to set the font color method for placing some text in a paragraph of text in div.
A paragraph of text is placed in DIV or P, and when we set div or p to set the font color, the font color of all the text in it will become the font color we set. Usually layout a paragraph of text in which several words or parts of the font color is different, at this time can skillfully use the span tag to set class or id or directly set CSS to set the desired font color.
1. CSS color style word: color
2. Instructions for example tutorials
Here, different colors are set for some of the text in p and DIV.
3. Example code
Span sets different colors for some text in a paragraph.
Div {color:#000}
P {color:#F00}
.red {color:#F00}
# blue {color:#06F}
Welcome to php Chinese website to learn html technology, there are comprehensive css tutorials
This case is for a paragraph of text in which part of the text is set to different colors. Use SPAN tags to achieve.
Directly use span for text and then write CSS directly to achieve different font colors.
After reading this article, I believe you have a certain understanding of "how css uses span tags to set the font color of some text in div". If you want to know more about it, you are welcome to follow the industry information channel. Thank you for reading!
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: 0
*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.