Get the App
SLTechnology News&Howtos  ›  Development  › 

How does css realize the background color that goes straight to the bottom of the screen

Shulou Source: shulou.com Published: 2022-06-01 05:40:57 10月03日 Update

This article mainly shows you the "css how to achieve straight to the bottom of the screen background color", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "css how to achieve straight to the bottom of the screen background color" this article.

Go straight to the background color at the bottom of the screen

It is not possible for CSS to control vertically. If you want the navigation bar to go straight to the bottom of the page like the content bar, it's convenient to use a table, but if you only use this CSS:

# navigation {background:blue;width:150px}

The shorter navigation bar does not go straight to the bottom, and it ends at the end of the way. I don't know what to do

Unfortunately, we can only use deception to add a background image to the shorter column with the same width as the column width and make it the same color as the set background color.

Body {background:url (blue-image.gif) 00repeat-y}

You can't use em as a unit at this time, because that way, once the reader changes the font size, the trick will be revealed and can only be used with px.

The above is all the content of the article "how to achieve the background color at the bottom of the screen by 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!

Tags: Background bottom content screen article study navigation help in that case unfortunately content bar halfway unit size font width what to do means direction easy to understand Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Shulou Information MySQL Shulou Tech Info Docker