盒子和css背景

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .h1:hover{
            border-width: 3px;
            border-style: dotted;
            border-color: blue;
            border-left-width: 2px;
            border-right-width: 2px;
            border-top-style: solid;
            border-left-style: dotted;
            border-right-style: dotted;
            border-bottom-style: solid;
            padding: 10px 5px 3px 0px;
        }
        .p1:hover{
            /* 上右下左的方向 */
            border-width: 5px 2px 10px 0px;
            border-style: dashed groove double;
            border-color: blue;
            /* 设置复合属性 */
            border:2px double blue;
            margin: 40px;
            text-align: center;
        }
        img{
            width: 100px;
            height: 200px;
        }
        /* 超出div的范围自动加入滚动条 */
        div{
            width: 200px;
            height: 100px;
            overflow: auto;
            background-color: yellow;
            background-repeat: repeat;
        }
      body{
          background-image: url("Hydrangeas.jpg");
          /* 水平上平铺 */
          background-repeat: repeat;
          /* 背景图像是否滚动 */
          background-attachment: fixed;
          background-position: right bottom;

          }
      
    </style>
</head> 
<body>
    <h1 class="h1">四川大学锦江学院</h1>
    <p class="p1">计算机学院</p>
    <img src="Hydrangeas.jpg" alt="">
    <div><p>
        计算机计算机计算机        
        计算机计算机计算机
        计算机计算机计算机
        计算机计算机计算机
        计算机计算机计算机
        计算机计算机计算机
        计算机计算机计算机
        计算机计算机计算机
        计算机计算机计算机
        计算机计算机计算机
        计算机计算机计算机
        计算机计算机计算机
        计算机计算机计算机
        计算机计算机计算机
        计算机计算机计算机
        计算机计算机计算机
        
        
        </p></div>
</body>
</html>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值