900字范文,内容丰富有趣,生活中的好帮手!
900字范文 > css设置背景图片大小_如何使用CSS设置背景图片大小?

css设置背景图片大小_如何使用CSS设置背景图片大小?

时间:2021-09-10 09:45:48

相关推荐

css设置背景图片大小_如何使用CSS设置背景图片大小?

css设置背景图片大小

Introduction:

介绍:

As we all know that the images are a very responsive yet very creative way to display your web page or website to the users. The images also play a major role in indulging users to websites or web pages. The images are a very smart way to represent any piece of information through colors and art.

众所周知,图像是一种向用户显示您的网页或网站的响应Swift但非常有创意的方式。 这些图像在吸引用户访问网站或网页方面也起着重要作用。 图像是一种非常聪明的方式,可以通过颜色和艺术品来表示任何信息。

Now that we know the importance and necessity of the images, why don’t we think about the topic at hand which is how can we set the background image size using CSS on our website or web page and to answer that curiosity, keep reading!

现在我们知道了图像的重要性和必要性,为什么不考虑手头的话题,那就是我们如何才能在我们的网站或网页上使用CSS设置背景图像的大小,并回答这种好奇心,请继续阅读!

Method:

方法:

To set the background image size the background-size property of CSS is used.

要设置背景图像的大小,使用CSS的background-size属性。

Syntax:

句法:

Element{background-size:auto|length|cover|contain;}

Values:

值:

Now that we have a basic idea of this property and how it helps in resizing the image on our website or web page, so let us keep moving forward in this article and get to know about the different values about this property.

现在,我们已经对该属性有了基本的了解,以及它如何帮助调整网站或网页上图像的大小,因此让我们在本文中继续前进,并了解该属性的不同值。

This property contains 4 values to the background-size property and is listed below,

该属性包含background-size属性的4个值,并在下面列出,

aut

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。