background-position属性怎么用


当前第2页 返回上一页

CSS background-position属性的使用示例

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8">

<style>

body

{

    background-image:url('http://ypimg.muzhuangnet.com/Collect/csharp/upload/article/000/000/024/5c6a4428ea867709.png');

    background-repeat:no-repeat;

    background-attachment:fixed;

    background-position:center 50px;

}

</style>

</head>

 

<body>

 

</body>

</html>

效果图:

1.jpg

以上就是本篇文章的全部内容,希望能对大家的学习有所帮助。

以上就是background-position属性怎么用的详细内容,更多文章请关注木庄网络博客

返回前面的内容

相关阅读 >>

css选择器first-child与first-of-type之间有什么区别?

详解css行内样式、内嵌样式与外部引用样式的使用方法

css的背景图怎么加边框

邮件不支持css怎么办

css什么时候用class和id

在css中什么是行高

css 什么是相对长度单位

css怎么让li强制不换行

css中id选择器的命名规则有哪些

css如何取消加粗

更多相关阅读请进入《background-position属性》频道 >>




打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...