发表于: 2022-11-23 20:36:15

0 386





html:


<!DOCTYPE html>
<html lang="en">
<head>
 <meta charset="UTF-8">
 <meta name="viewport" content="width=720,initial-scale=1">
 <link rel="stylesheet" href="youxi.css">
 <link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.2.0/css/bootstrap.min.css" rel="stylesheet">
 <title>js任务2</title>
</head>
<body>
<div class="box">
 <div class="head">
   <div class="rectangle1">
     <img src="tupian/矩形%207.png" alt="矩形">
   </div>
   <div class="rectangle2">
     <img src="tupian/矩形%207.png" alt="矩形">
   </div>
   <div class="rectangle3">
     <img src="tupian/矩形%207.png" alt="矩形">
   </div>
 </div>

 <div class="trunk">
   <div class="review">
     <p>上次游戏 : 抓鬼猜词版</p>
     <img class="back" src="tupian/Back%20_%20Icon.png">
   </div>

   <div class="content">
     <div class="title">
       <p>捉鬼游戏</p>
     </div>

     <button class="button" onclick="myFunc()">简化版</button>
     <p>1133个用户正在玩此款游戏</p>

     <button class="button">猜词版</button>
     <img class="polygon" src="tupian/多边形%202.png" alt="多边形">

     <p>1133个用户正在玩此款游戏</p>

     <button class="button">白痴版</button>
     <p>1133个用户正在玩此款游戏</p>
     <img class="circular" src="tupian/椭圆%201.png">
     <img class="circular" src="tupian/椭圆%202.png">
     <img class="circular" src="tupian/椭圆%202.png">
     <img class="circular" src="tupian/椭圆%202.png">

   </div>
 </div>

</div>


<script language="javascript" type="text/javascript">
 function myFunc() {
window.open("./pipei.html",'_blank') //页面跳转
 }
</script>


</body>
</html>


css:


* {
margin: 0;
   padding: 0;
}

.box {
height: 100vh;
   background-color: #f0f0f0;
   margin: 0 auto;
}

.head {
height: 128px;
   background-color: #29bde0;
   flex-wrap: wrap;
}

.rectangle1 {
margin-left: 20px;
   padding-top: 63px;
   height: 76px;

}

.rectangle2 {
margin-left: 20px;
   height: 14px;


}

.rectangle3 {
margin-left: 20px;

}

p {
color: #bcbcbc;
   font-size: 25px;
   text-align: center;
}

.trunk {
height: 1110px;
   background-color: #efefef;
}

.review {
background-color: #ffffff;
   height: 119px;
   margin: 27px 36px ;
}

.review p {
font-size: 35px;
   color: #a0a0a0;
   text-align: center;
   padding-top: 30px;
}

.back {
float: right;
   margin-top: -58px;
   margin-right: 15px;
}

.content {
background-color: #ffffff;
   margin: 0 35px;
   text-align: center;
   position: relative;
}

.title {
height: 90px;
   border-bottom:solid;
   border-color: #fdd793;

}

.title p {
color: #fbb435;
   font-size: 38px;
   text-align: center;
   padding-top: 15px;
}

.button {
font-size: 32px;
   width: 465px;
   height: 135px;
   background-color: #69d1e9;
   margin: 30px;
   color: #ffffff;
   border: none;
}

.polygon {
position: absolute;
   top: 47%;
   left: 94%;
}

.circular {
margin-bottom: 10px;
}



页面效果:

页面跳转:






明天计划:完成接下来的任务。





返回列表 返回列表
评论

    分享到