In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you how to set the maximum width and height of css elements, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
Setting method: 1, use the "max-width" attribute to set the maximum width of the element, the syntax is "element {max-width: the maximum width value of the element;}"; 2, use the "max-height" attribute to set the maximum height of the element, the syntax is "element {max-width: the maximum height value of the element;}".
The operating environment of this tutorial: windows10 system, CSS3&&HTML5 version, Dell G3 computer.
How css sets the maximum width and height of an element
In css, you can use the max-width and max-height attributes to set the maximum width and height of an element, the function of the max-width attribute is to define the maximum width of the element, and the function of the max-height attribute is to set the maximum height of the element.
Let's take a look at how to set the maximum width and height of an element through an example, as follows:
Document p {text-indent: 1cm; max-width:350px; max-height:100px;}
The danger is very high! The westward way is harder than to climb the sky! According to legend, Bombyx mori and Yufu established the kingdom of Shu, and the founding of the country has been impossible to discuss in detail for a long time! Since then, there have been about 48,000 people who have no contact with Qin Sai. In the west of Taibai Mountain, there is a path that birds can cross, which can cross the top of the eyebrow. The five strong men of Shu were crushed to death in the landslide, and the staircase paths of the two places began to connect with each other. There are mountain tops blocking the six dragons of the sun god, and tortuous rivers emptied by surging waves below. The yellow swan, which is good at flying high, can not be flown by, and the ape wants to climb. How the Qingni Ridge twists and turns around the mountains, lingering nine bends around the rocks within a hundred steps. You can touch ginseng and Jing Xing to hold your head and hold your breath, and you can sit down and sigh in horror with your hands.
Output result:
The above is all the content of the article "how to set the maximum width and height of elements in css". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, 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.