手抄报 安全手抄报 手抄报内容 手抄报图片 英语手抄报 清明节手抄报 节约用水手抄报

如何将图像设置为网页背景

时间:2024-10-11 22:01:18

1、bac氯短赤亻kgoround-image代码。我们用这个代码向一个网页中的body进行赋值就行了。<html><head><style type="text/css">body {background-image:url(/i/4.gif);}</style></head><body></body></html>

如何将图像设置为网页背景

2、在网页中的三个元素进行背景的图像指定。<html><head><style type="text/艘早祓胂css">body {background-image:url(/i/4.gif);}p.flower {background-image: url(/3.gif); padding: 20px;}a.radio {background-image: url(/i/7.gif); padding: 20px;}</style></head><body><p class="flower">落。<a href="*" class="radio">景的链接。</a></p></body></html>

如何将图像设置为网页背景

3、background-repeat 代码的使用会让背景中的图像重复出现。<style type="text/css">body{background-image:url(/i/eg_bg_03.gif);background-repeat: repeat}</style>

如何将图像设置为网页背景

4、我们重复背景图像的方法可以分为 水平重复或者垂直重复!background-repeat: repeat-ybackground-repeat: repeat-x

如何将图像设置为网页背景

5、还有一种情况就是图像在网页当中只使用一次。background-repeat: no-repeat

如何将图像设置为网页背景

6、我们可以让图像在网页中的位置进行定位,这个位置是指定的。background-position:center;background-position:top;

如何将图像设置为网页背景
© 手抄报圈