I have been away from programming for a few years and I want to start again. Here I want to create a login form that has a few pictures and On each one, the mouse of the same photo is enlarged and a login form or a link bag is opened .... I went a little further, but then I got into trouble. Thank you for your help.
<style>
.container {
display: flex;
width: 100%;
padding: 4% 2%;
box-sizing: border-box;
height: 100vh;
}
.box {
flex: 1;
overflow: hidden;
transition: .5s;
margin: 0 1%;
box-shadow: 0 20px 30px rgba(0,0,0,.1);
line-height: 0;
}
.box > img {
width: 200%;
height: calc(100% - 10vh);
object-fit: cover;
transition: .5s;
}
.box > span {
font-size: 3.8vh;
display: block;
text-align: center;
height: 10vh;
line-height: 2.6;
}
.box:hover { flex: 1 1 50%; }
.box:hover > img {
width: 100%;
height: 100%;
}
</style>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title> login </title>
</head>
<body>
<div class="container">
<div class="box">
<img src="C:mada1.jpg">
<span>login1 </span>
</div>
<div class="box">
<img src="C:mada2.jpg">
<span>login2 </span>
</div>
<div class="box">
<img src="C:mada3.jpg">
<span>login3 </span>
</div>
<div class="box">
<img src="C:mada4.jpg">
<span> login4 </span>
</div>
</div>
</body>
</html>
question from:
https://stackoverflow.com/questions/65921534/login-form-with-image-hover-in-html-css 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…