根据下面的html代码简化和优化来设计出具有魔幻感的前端界面并给出从body开始具体的代码htmlhead titleWEB攻防平台title link href=httpscdnbootcsscomfont-awesome470cssfont-awesomemincss rel=stylesheet style body background-color #1f1f1f; color
<html>
<head>
<title>WEB攻防平台</title>
<link href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<style>
body {
background-color: #1f1f1f;
color: #fff;
font-family: Arial, sans-serif;
font-size: 16px;
margin: 0;
padding: 0;
}
.container {
max-width: 800px;
margin: 0 auto;
padding: 40px 20px;
}
.cd-side-navigation {
position: fixed;
top: 0;
left: 0;
height: 100%;
background-color: #3f3f3f;
z-index: 9999;
overflow-y: auto;
-webkit-transition: all 0.3s;
transition: all 0.3s;
}
.cd-side-navigation ul {
padding: 0;
margin: 0;
list-style: none;
}
.cd-side-navigation li {
position: relative;
}
.cd-side-navigation li a {
display: block;
color: #fff;
font-size: 20px;
font-weight: bold;
padding: 20px;
text-decoration: none;
-webkit-transition: all 0.3s;
transition: all 0.3s;
}
.cd-side-navigation li a:hover {
background-color: #2ecc71;
color: #fff;
}
.cd-side-navigation li a.selected {
background-color: #2ecc71;
color: #fff;
}
.cd-side-navigation svg {
fill: none;
stroke: #fff;
stroke-width: 2;
stroke-linecap: square;
stroke-miterlimit: 10;
width: 24px;
height: 24px;
margin-right: 10px;
vertical-align: middle;
}
.section-wrap {
display: flex;
flex-wrap: wrap;
margin-top: 80px;
}
.section {
flex-basis: 100%;
padding: 40px;
background-color: #2ecc71;
color: #fff;
}
.section-1 {
background-image: url("https://cdn.pixabay.com/photo/2015/12/08/00/30/fantasy-1088145_960_720.jpg");
background-size: cover;
background-position: center;
text-align: center;
}
.cd-title {
margin-top: 100px;
margin-bottom: 0;
}
.cd-title h2 {
font-size: 48px;
margin-bottom: 20px;
}
.cd-title span {
font-size: 24px;
}
.section-2 {
background-color: #fff;
color: #2ecc71;
}
.title {
text-align: center;
margin-bottom: 40px;
}
.tit {
font-size: 36px;
font-weight: bold;
margin-bottom: 20px;
}
.section-1-1 {
font-size: 18px;
line-height: 1.5;
margin-bottom: 40px;
}
.section-1-1 span {
font-weight: bold;
display: block;
margin-bottom: 10px;
margin-top: 20px;
}
.content {
margin-top: 40px;
text-align: center;
}
.content ul {
padding: 0;
margin: 0;
list-style: none;
}
.content li {
display: inline-block;
margin-right: 10px;
}
.content li a {
display: inline-block;
padding: 10px;
background-color: #2ecc71;
color: #fff;
text-decoration: none;
border-radius: 5px;
-webkit-transition: all 0.3s;
transition: all 0.3s;
}
.content li a:hover {
background-color: #27ae60;
}
.on {
background-color: #fff;
color: #2ecc71;
border: 2px solid #2ecc71;
border-radius: 5px;
padding: 10px;
margin-right: 10px;
-webkit-transition: all 0.3s;
transition: all 0.3s;
}
.on:hover {
background-color: #2ecc71;
color: #fff;
border: 2px solid #fff;
}
</style>
</head>
<body>
<nav class="cd-side-navigation">
<ul>
<li>
<a href="#" class="selected">
<svg class="nc-icon outline" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="24px" height="24px" viewBox="0 0 24 24"><g transform="translate(0, 0)"> <polygon fill="none" stroke="#fff" stroke-width="2" stroke-linecap="square" stroke-miterlimit="10" points="12,2 3,10 3,23 9,23 9,16 15,16 15,23 21,23 21,10 " stroke-linejoin="miter"></polygon> </g></svg>
WEB攻防平台
</a>
</li>
</ul>
</nav>
<pre><code><div class="container">
<section class="section-wrap">
<div class="section section-1">
<div class="cd-title">
<h2>WEB攻防平台</h2>
<span>平台演练环境均内部使用</span>
</div>
</div>
<div class="section section-2">
<div class="title">
<p class="tit">注入系列</p>
<div class="section-1-1">
<span>相关概念</span>
<p>随作用。</p>
<div id="cen_right_top">
<div class="cen_right_top">
<a href="#" class="on">模拟实战一</a>
</div>
<div class="content">
<ul style="display:block">
<li><a href="http://192.168.1.5/" title="网站入口">Asp+access手工注入</a></li>
</ul>
</div>
</div>
<div id="cen_right_top">
<div class="cen_right_top">
<a href="#" class="on">模拟实战二</a>
</div>
<div class="content">
<ul style="display:block">
<li><a href="http://192.168.1.5/" title="网站入口">Asp+access手工注入</a></li>
</ul>
</div>
</div>
<div id="cen_right_top">
<div class="cen_right_top">
<a href="#" class="on">模拟实战三</a>
</div>
<div class="content">
<ul style="display:block">
<li><a href="http://192.168.1.5/" title="网站入口">Asp+access手工注入</a></li>
</ul>
</div>
</div>
<div id="cen_right_top">
<div class="cen_right_top">
<a href="#" class="on">模拟实战四</a>
</div>
<div class="content">
<ul style="display:block">
<li><a href="http://192.168.1.5/" title="网站入口">Asp+access手工注入</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
</code></pre>
</body>
</html>
原文地址: https://www.cveoy.top/t/topic/M8E 著作权归作者所有。请勿转载和采集!