background-image背景图片
- url('图像的url路径地址')图像的url
- none 表示背景上没有放置任何图像,这是默认值;
- inherit 指定背景图像应该从那个父元素继承;
- 一个元素可以引入多张背景图片;指定要使用的一个或多个背景图像,默认情况下,background-image放置在元素的左上角,并重复垂直和水平方向.
- background-image:url('pic1.png'),('pic2..png')...
- background-iamge属性不能被继承

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style>
.logo a {
display: block;
width: 200px;
height: 60px;
background-image: url(https://www.chcedo.com/images/public/logo.png);
text-indent: -9999px;/**首段缩进/
}
</style>
</head>
<body>
<h1 class="logo"><a href="#">自然堂(CHANDO)官网</a></h1>
</body>
</html>
background背景相关之背景图片
backgound-image:url('背景图片的路径')
backgound:url('背景图片的路径')
转载请注明:大灰牛博客 » background-image背景图片