我在一个小网站前端工作,那里的一切都在按计划进行,但我的一个hrefs上的头是不可点击的。我认为这是CSS的问题。这里我将添加项目的html和css。
主队图书etx的标题链接在html中给出了href,但它是不可点击的。
而且我也得到了垂直的高度得到了卷轴的收割,我不想那样。我怎么摆脱它?
null
* {
margin: 0;
box-sizing: border-box;
font-family: Century Gothic;
}
/** header **/
.main{
align-items: center;
}
ul {
margin-top: 15px;
list-style-type: none;
float: right;
}
ul li {
display: inline-block;
}
ul li a {
text-decoration: none;
text-shadow: #000;
border: 1px solid transparent;
color: #b61e83;
padding: 5px 20px;
transition: 0.6s ease;}
ul li a:hover{
background-color: #ff4562;
color: #000;
border: 1px solid #000;
}
ul li.active a{
background-color: #b61e83;
color: #fff;
}
#top {
position: absolute;
top: 0px;
right: 0px;
z-index: -1;
}
#bottom {
position: absolute;
bottom: 0px;
right: 0px;
z-index: -1;
}
/** body **/
body {
padding: 50px 100px;
align-content: center;
background-image: linear-gradient(111.37738709038058deg, rgba(43, 45, 78, 1) 1.557291666666667%, rgba(225, 20, 139, 1) 101.34895833333333%);
/*linear-gradient(114.50890543382422deg, rgba(28, 0, 66, 1) 1.6731770833333333%, rgba(0, 235, 215, 1) 97.94270833333331%);*/
display: inherit;
align-items: center;
min-height: 100vh;
}
/** home text **/
.hometext {
position: absolute;
right: 25%;
top: 40%;
color: #fff;
width: 500px;
}
.quote {
position: relative;
justify-content: center;
}
/** clock css **/
.clock {
position: absolute;
top: 25%;
left: 18vw;
width: 500px;
height: 500px;
display: flex;
justify-content: center;
align-items: center;
background: url(../images/_clock.png);
background-size: cover;
border-radius: 50%;
box-shadow: 0 -25px +25px rgba(255, 255, 255, 0.05),
inset 0 -25px +25px rgba(255, 255, 255, 0.05),
0 25px 25px rgba(0, 0, 0, 0.05),
inset 0 25px 25px rgba(0, 0, 0, 0.05);
}
.clock:before {
content: '';
position: absolute;
width: 25px;
height: 25px;
background: #fff;
border-radius: 50%;
z-index: 1000;
}
.clock .hour,
.clock .min,
.clock .sec {
position: absolute;
}
.clock .hour,
.hr {
width: 260px;
height: 200px;
}
.clock .min,
.mn {
width: 250px;
height: 300px;
}
.clock .sec,
.sc {
width: 330px;
height: 330px;
}
.hr,
.mn,
.sc {
display: flex;
justify-content: center;
/*align-items: center;*/
position: absolute;
border-radius: 50%;
}
.hr:before {
content: '';
position: absolute;
width: 12px;
height: 90px;
background: #ff105e;
z-index: 10;
border-radius: 6px 6px 0 0;
}
.mn:before {
content: '';
position: absolute;
width: 4px;
height: 150px;
background: #fff;
z-index: 11;
border-radius: 6px 6px 0 0;
}
.sc:before {
content: '';
position: absolute;
width: 2px;
height: 200px;
background: #fff;
z-index: 12;
border-radius: 6px 6px 0 0;
}
/** animated background **/
.circles {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
overflow: hidden;
}
.circles li {
position: absolute;
display: block;
list-style: none;
width: 20px;
height: 20px;
background: rgba(255, 255, 255, 0.2);
animation: animate 25s linear infinite;
bottom: -150px;
}
.circles li:nth-child(1) {
left: 25%;
width: 80px;
height: 80px;
animation-delay: 0s;
}
.circles li:nth-child(2) {
left: 10%;
width: 20px;
height: 20px;
animation-delay: 2s;
animation-duration: 12s;
}
.circles li:nth-child(3) {
left: 70%;
width: 20px;
height: 20px;
animation-delay: 4s;
}
.circles li:nth-child(4) {
left: 40%;
width: 60px;
height: 60px;
animation-delay: 0s;
animation-duration: 18s;
}
.circles li:nth-child(5) {
left: 65%;
width: 20px;
height: 20px;
animation-delay: 0s;
}
.circles li:nth-child(6) {
left: 75%;
width: 110px;
height: 110px;
animation-delay: 3s;
}
.circles li:nth-child(7) {
left: 35%;
width: 150px;
height: 150px;
animation-delay: 7s;
}
.circles li:nth-child(8) {
left: 50%;
width: 25px;
height: 25px;
animation-delay: 15s;
animation-duration: 45s;
}
.circles li:nth-child(9) {
left: 20%;
width: 15px;
height: 15px;
animation-delay: 2s;
animation-duration: 35s;
}
.circles li:nth-child(10) {
left: 85%;
width: 150px;
height: 150px;
animation-delay: 0s;
animation-duration: 11s;
}
@keyframes animate {
0% {
transform: translateY(0) rotate(0deg);
opacity: 1;
border-radius: 0;
}
100% {
transform: translateY(-1000px) rotate(720deg);
opacity: 0;
border-radius: 50%;
}
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Javascript Clack UI Dark</title>
<link rel="stylesheet" href="css/style.css">
<link href="https://fonts.googleapis.com/css2?family=Cabin+Sketch:wght@700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body>
<!-- Head ellements -->
<div class="main">
<ul>
<li class="active"><a href="#"><b>Home</b></a></li>
<li><a href="#"><b>Team</b></a></li>
<li><a href="#"><b>Exams</b></a></li>
<li><a href="#"><b>Books</b></a></li>
<li><a href="#"><b>Demo</b></a></li>
<li><a href="www.neram.co.in"><b>Alumnus</b></a></li>
<li><a href="#"><b>Contact</b></a></li>
</ul>
</div>
<header>
<img src="images/web-yellow.png">
<!-- SVG cuts -->
<svg id="top" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1144 107.17">
<defs>
<style>
.cls-1 {
fill: #fff;
}
</style>
</defs>
<path class="cls-1" d="M221.5-.5s2.26,0,6.49.19C261.54.77,419,7.31,557.5,37.5c156,34,299,65,474,69s334-66,334-66V-.5Z" transform="translate(-221.5 0.5)" />
</svg>
<svg id="bottom" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1129 334">
<defs>
<style>
.cls-1 {
fill: #fff;
}
</style>
</defs>
<path class="cls-1" d="M237,768s394.36-9.88,698.58-72.73S1366,434,1366,434V768Z" transform="translate(-237 -434)" />
</svg>
</header>
<!-- HTML for clock -->
<div class="clock">
<div class="hour">
<div class="hr" id="hr"></div>
</div>
<div class="min">
<div class="mn" id="mn"></div>
</div>
<div class="sec">
<div class="sc" id="sc"></div>
</div>
</div>
<!-- Header paragraphy -->
<div class="hometext">
<h3>neram | classes</h3><br>
<p>Meeting right person at right time will change everything in life. It happended for us.</p><br>
<p class="quote">“We are one of that kind” </p><br>
<p>Hence we name our initiative as neram ( Time ). neram is not a typical NATA coaching center, we are architects & Designers from various parts of the world working for the betterment of next generation of architects. We belive our NATA coaching is the starting point for that.</p>
</div>
<!-- Animates shapes -->
<div class="area">
<ul class="circles">
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
</div>
<!-- java scrtipt for clock -->
<script type="text/javascript">
const deg = 6;
const hr = document.querySelector('#hr');
const mn = document.querySelector('#mn');
const sc = document.querySelector('#sc');
setInterval(() => {
let day = new Date();
let hh = day.getHours() * 30;
let mm = day.getMinutes() * deg;
let ss = day.getSeconds() * deg;
hr.style.transform = `rotateZ(${(hh)+(mm/12)}deg)`;
mn.style.transform = `rotateZ(${mm}deg)`;
sc.style.transform = `rotateZ(${ss}deg)`;
})
</script>
</body>
</html>
null
在href中,您需要像在alumnus中那样,将路径放在您希望它指向的地方。
href="http://www.example.com"
你用了min-height,告诉它至少是100VH,但是它没有限制,所以它可以超过100VH。还可以尝试添加一个max-height。
Max-height:100vh;