<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style>
#box {
width: 500px;
height: 300px;
margin: auto;
margin-top: 100px;
background-color: pink;
position: relative;
border-radius: 10px;
overflow: hidden;
}
.box1{
background-image: URL(https://images.pexels.com/photos/12161836/pexels-photo-12161836.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=2);
}
.box2{
background-image
JS点击切换背景
最新推荐文章于 2024-08-03 17:05:14 发布