• css-水滴登录页


    效果图
    请添加图片描述

    html

    <!DOCTYPE html>
    <html>
    	<head>
    		<meta charset="utf-8">
    		<title></title>
    		<link type="text/css" rel="stylesheet" href="login.css" />
    	</head>
    	<body>
    		<div class="box">
    			<div class="content">
    				<h2>登录</h2>
    				<div><input type="text" placeholder="请输入用户名"></div>
    				<div><input type="text" placeholder="请输入用户密码"></div>
    				<div><input type="submit" value="登录"></div>
    			</div>
    			<a href="#" class="btns">忘记密码</a>
    			<a href="#" class="btns register">注册</a><strong></strong>
    		</div>
    	</body>
    </html>
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20

    css

    * {
    	margin: 0;
    	padding: 0px;
    	box-sizing: border-box;
    	/* box-sizing: border-box就是将border和padding数值包含在width和height之内,这样的好处就是修改border和padding数值盒子的大小不变。*/
    }
    
    body {
    	height: 100vh;
    	background: #eff0f4;
    }
    
    .box {
    	position: relative;
    	display: flex;
    	justify-content: space-between;
    	margin: 230px auto;
    	width: 470px;
    }
    
    .box .content {
    	position: relative;
    	display: flex;
    	flex-direction: column;
    	justify-content: space-around;
    	align-items: center;
    	width: 350px;
    	height: 350px;
    	padding: 60px 20px;
    	box-shadow:
    	    20px 20px 20px rgba(0, 0, 0, .05) inset,
    		25px 35px 20px rgba(0, 0, 0, .05),
    		25px 30px 30px rgba(0, 0, 0, .05),
    		-20px -20px 25px rgba(255, 255, 255, .9) inset;
    }
    
    .box .content {
    	transition: .5s;
    	border-radius: 52% 48% 33% 67% /
    	            38% 45% 55% 62%;
    	
    }
    
    .box .content:hover{
    	border-radius: 50%
    }
    
    .box .content::before{
    	content: '';
    	position: absolute;
    	top: 50px;
    	left: 85px;
    	width: 35px;
    	height: 35px;
    	border-radius: 50%;
    	background-color: #fff;
    	opacity: 0.9;
    }
    
    .box .content::after{
    	content: '';
    	position: absolute;
    	top: 90px;
    	left: 110px;
    	width: 15px;
    	height: 15px;
    	border-radius: 50%;
    	background-color: #fff;
    	opacity: 0.9;
    }
    
    .box .content div{
    	position: relative;
    	width: 225px;
    	border-radius: 25px;
    	box-shadow: 
    	    inset 20px 5px 10px rgba(0,0,0,.1),
    		inset -2px -5px 10px rgba(255,255,255,1),
    		15px 15px 10px rgba(0,0,0,.05),
    		15px 10px 15px rgba(0,0,0,.025);
    	
    }
    .box .content input{
    	width: 100%;
    	border: none;
    	outline: none;
    	background: transparent;
    	font-size: 16px;
    	padding: 10px 15px;
    	
    	
    }
    
    .box .content input[type="submit"]{
    	color: #fff;
    	cursor: pointer;
    }
    
    .box .content div:last-child{
    	width: 120px;
    	background-color: #ff0f5b;
    	transition: .5s;
    	box-shadow:
    	    inset 2px 5px 10px rgba(0,0,0,.1),
    	    15px 15px 10px rgba(0,0,0,.05),
    	    15px 10px 15px rgba(0,0,0,.025);
    }
    
    .box .content div:last-child:hover{
    	width: 150px;
    }
    
    .box .content div::before{
    	content: '';
    	position: absolute;
    	top:8px;
    	left: 50%;
    	transform: translateX(-50%);
    	width: 65px;
    	height: 5px;
    	background: rgba(255, 255, 255, .5);
    	border-radius: 5px;
    }
    
    .btns{
    	position: absolute;
    	right: 0px;
    	bottom: 0px;
    	width: 120px;
    	height: 120px;
    	background: #c61dff;
    	display: flex;
    	justify-content: center;
    	align-items: center;
    	cursor: pointer;
    	text-decoration: none;
    	color: #fff;
    	font-size: 14px;
    	
    	border-radius:  46% 56% 65% 35% / 57% 58% 42% 43%;
    	box-shadow:
    	    inset 10px 10px 10px rgba(190,1,254,.05),
    	    15px 25px 10px rgba(190,1,254,.1),
    	    15px 20px 20px rgba(190,1,254,.1),
    		inset -10px -10px 15px rgba(255,255,255,.5);
    }
    
    .btns::before{
    	content: '';
    	position: absolute;
    	top: 15px;
    	left: 30px;
    	width: 20px;
    	height: 20px;
    	border-radius: 50%;
    	background-color: #fff;
    	opacity: 0.45;
    }
    
    .btns{
    	transition: 0.25s;
    }
    
    .btns:hover{
    	border-radius: 50%;
    }
    
    .register{
    	right: 0px;
    	bottom: 150px;
    	width: 80px;
    	height: 80px;
    	background: #01b4ff;
    	display: flex;
    	justify-content: center;
    	align-items: center;
    	cursor: pointer;
    	text-decoration: none;
    	color: #fff;
    	font-size: 14px;
    	
    	border-radius:  49% 51% 52% 48% / 63% 59% 41% 37%;
    	box-shadow:
    	    inset 10px 10px 10px rgba(1,180,255,.05),
    	    15px 25px 10px rgba(1,180,255,.1),
    	    15px 20px 20px rgba(1,180,255,.1),
    		inset -10px -10px 15px rgba(255,255,255,.5);
    }
    
    .register::before{
    	left: 20px;
    	width: 15px;
    	height: 15px;
    }
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70
    • 71
    • 72
    • 73
    • 74
    • 75
    • 76
    • 77
    • 78
    • 79
    • 80
    • 81
    • 82
    • 83
    • 84
    • 85
    • 86
    • 87
    • 88
    • 89
    • 90
    • 91
    • 92
    • 93
    • 94
    • 95
    • 96
    • 97
    • 98
    • 99
    • 100
    • 101
    • 102
    • 103
    • 104
    • 105
    • 106
    • 107
    • 108
    • 109
    • 110
    • 111
    • 112
    • 113
    • 114
    • 115
    • 116
    • 117
    • 118
    • 119
    • 120
    • 121
    • 122
    • 123
    • 124
    • 125
    • 126
    • 127
    • 128
    • 129
    • 130
    • 131
    • 132
    • 133
    • 134
    • 135
    • 136
    • 137
    • 138
    • 139
    • 140
    • 141
    • 142
    • 143
    • 144
    • 145
    • 146
    • 147
    • 148
    • 149
    • 150
    • 151
    • 152
    • 153
    • 154
    • 155
    • 156
    • 157
    • 158
    • 159
    • 160
    • 161
    • 162
    • 163
    • 164
    • 165
    • 166
    • 167
    • 168
    • 169
    • 170
    • 171
    • 172
    • 173
    • 174
    • 175
    • 176
    • 177
    • 178
    • 179
    • 180
    • 181
    • 182
    • 183
    • 184
    • 185
    • 186
    • 187
    • 188
    • 189
    • 190
    • 191
    • 192
    • 193
    • 194
  • 相关阅读:
    MySQL中 JOIN关联查询的原理以及优化手段
    Java解析Json格式数据
    可爱猫+python3+Flask+aiohttp简单搭建微信机器人
    【探索AI】二十四 深度学习之第7周:深度学习在实际应用中的案例
    平衡优化算法(EO)结合粘液霉菌算法(SMA)(Matlab代码实现)
    [附源码]java毕业设计中达小区物业管理系统
    表格内日期比较计算
    技术架构图是什么?和业务架构图的区别是什么?
    《实用软件工程》课程教学大纲(Practicality Software Engineering)
    全程软件自动化测试
  • 原文地址:https://blog.csdn.net/sunboylife/article/details/133907235