CSS中如何使用background-position属性(background-position,css,web开发)

时间:2024-05-06 04:42:20 作者 : 石家庄SEO 分类 : web开发
  • TAG :

CSS background-position属性

定义和用法

CSS background-position属性设置背景图像的起始位置。

这个属性设置背景原图像(由CSS background-image定义)的位置,背景图像如果要重复,将从这一点开始。

提示:您需要把CSS background-attachment属性设置为"fixed",才能保证该属性在Firefox和Opera中正常工作。

CSS中如何使用background-position属性

实例

如何定位背景图像:

body{background-image:url('bgimage.gif');background-repeat:no-repeat;background-attachment:fixed;background-position:center;}

浏览器支持

所有浏览器都支持CSS background-position属性。

注释:任何版本的InternetExplorer(包括IE8)都不支持属性值"inherit"。

可能的值

CSS中如何使用background-position属性

 </div> <div class="zixun-tj-product adv-bottom"></div> </div> </div> <div class="prve-next-news">
本文:CSS中如何使用background-position属性的详细内容,希望对您有所帮助,信息来源于网络。
上一篇:vue的导航守卫怎么使用下一篇:

3 人围观 / 0 条评论 ↓快速评论↓

(必须)

(必须,保密)

阿狸1 阿狸2 阿狸3 阿狸4 阿狸5 阿狸6 阿狸7 阿狸8 阿狸9 阿狸10 阿狸11 阿狸12 阿狸13 阿狸14 阿狸15 阿狸16 阿狸17 阿狸18