In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces CSS how to achieve text and picture in the same row and text vertical center of the relevant knowledge, the content is detailed and easy to understand, simple and fast operation, has a certain reference value, I believe that after reading this CSS how to achieve text and picture in the same row and text vertical center article will have a harvest, let's take a look at it.
The DIV+CSS instance code is as follows:
DIV+CSS instance teaches test body {font-size:12px;}
CSS5 test pen and ink CSS
First of all, we set the name of the text css in the body of this page to 12px. Then introduce the image in html (expansion: CSS introduces-CSS reference) and several test ink after the image. You can copy the above code to create a new html page, and then go to the hunter to browse the new page, after all, it will be like the picture above.
Set up equipment and equipment css so that calligraphy and pictures in the same row when the bump vertical center we are only important in the CSS color, involved in the CSS code below: img {vertical-align:middle;} participate in the above picture setting bump center CSS pattern can be in the same row of calligraphy and picture vertical center.
The complete DIV+CSS code is as follows:
CSS example description Note Test body {font-size:12px;} img {vertical-align:middle;}
CSS5 test calligraphy
We can either review the above picture or I can easily copy the above incomplete css code and html source code (source code) to achieve the ability to center vertically with the operation control css.
DIV CSS stretch and progress assume that we configure the height of ".yangshi" with line-height, if we want to center the content vertically in this DIV, we can set vertical-align:middle, CSS code as follows: .yangshi img {vertical-align:middle;} it is worth saying that the height and line-height are not necessarily greater than the picture height, otherwise "CSS HACK" will not be compatible in different browsers.
This is the end of the article on "how to achieve the same row of text and picture and vertical center of text up and down" in CSS. Thank you for reading! I believe that everyone has a certain understanding of the knowledge of "how to achieve the same row of text and pictures and vertical center of text up and down" in CSS. If you want to learn more, you are welcome to follow the industry information channel.
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.