码迷,mamicode.com
首页 > Web开发 > 详细

css 在背景图上加渐变

时间:2017-07-18 11:56:31      阅读:213      评论:0      收藏:0      [点我收藏+]

标签:htm   rgb   body   center   url   code   color   开发   ack   

<html>

<head>
<title>我的第一个 HTML 页面</title>
<style>
    .banner {
        width: 100%;
        background: linear-gradient(to right bottom,rgba(0,0,0,0.9),rgba(0,0,0,0)),url(2.jpg) no-repeat center;
        height: 300px;
        color:white;
    }
  .center{
      width:1200px;
      margin:0 auto;
  }
</style>
</head>

<body>
 
    <div class="banner">
        <div class="center">
            <hgroup>
                <h2>开发者文档</h2>
                <h3>开发者在创建公众号、获得接口权限后,可阅读开发者文档帮助完成接入及功能开发。</h3>
            </hgroup>
        </div>
    </div>
    
</body>

</html>

 

css 在背景图上加渐变

标签:htm   rgb   body   center   url   code   color   开发   ack   

原文地址:http://www.cnblogs.com/lunawzh/p/7199173.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!