当前位置:网站首页>如何制作登录界面
如何制作登录界面
2022-06-27 16:05:00 【InfoQ】

第一步
<div class="container">
<h1>海拥 | 海瞳</h1>
<form action="">
<input type="text" class="tbx" placeholder="账号">
<input type="password" class="tbx" placeholder="密码">
<input type="submit" class="sub" value="登录">
</form>
</div>
你们万万想不到,在本次分享的代码了,html就这么多。
*{
margin:0;
padding:0;
}
body{
/* 设置body高度为100%窗口高度 */
height:100vh;
/* 弹性盒子模型 */
display: flex;
/* 限免两个属性是让body里的子类居中 */
justify-content: center;
align-items: center;
background-color: #1d1928;
}
.container{
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
width: 350px;
height: 450px;
border-radius: 20px;
background-color: #4471a3;
/* 盒子阴影 */
box-shadow: 15px 15px 10px rgba(33,45,58,0.3);
overflow: hidden;
position:relative;
}
.container form{
width: 350px;
height: 200px;
display: flex;
justify-content: space-around;
flex-direction: column;
align-items: center;
z-index: 1;
}
.container form .tbx{
width: 250px;
height: 40px;
outline: none;
border: none;
border-bottom: 1px solid #fff;
background: none;
color:#fff;
font-size: 15px;
}
/* 设置文本框提示文本的样式 */
.container form .tbx::placeholder{
color: #fff;
font-size: 15px;
}
.container form .sub{
width: 250px;
height: 40px;
outline: none;
border:1px solid #fff;
border-radius: 20px;
letter-spacing: 5px;
color:#fff;
background: none;
cursor: pointer;
margin-top: 20px;
}
.container h1{
color: #ecf0f1;
font-size: 50px;
letter-spacing: 5px;
font-weight: 100;
/* 文字阴影 */
text-shadow: 5px 5px 5px rgba(33,45,58,0.3);
z-index: 1;
}
/* 设置鼠标进入的样式 */
.container .in{
position: absolute;
top:0;
left:0;
display: block;
width: 0;
height: 0;
border-radius: 50%;
background: #cf455f;
transform: translate(-50%,-50%);
/* 使用in动画,持续0.5秒,缓出的时间函数,停留在最后一帧 */
animation: in 0.5s ease-out forwards;
}
/* 设置鼠标离开的样式 */
.container .out{
position: absolute;
top:0;
left:0;
display: block;
width: 1200px;
height: 1200px;
border-radius: 50%;
background: #cf455f;
transform: translate(-50%,-50%);
/* 使用out动画,持续0.5秒,缓出的时间函数,停留在最后一帧 */
animation: out 0.5s ease-out forwards;
}
/* 动画 */
/* 设置鼠标进入时,元素的动画 */
@keyframes in{
/* 初始关键帧 */
0%{
width: 0;
height: 0;
}
/* 结束关键帧 */
100%{
width: 1200px;
height: 1200px;
}
}
/* 设置鼠标离开时,元素的动画 */
@keyframes out{
/* 初始关键帧 */
0%{
width: 1200px;
height: 1200px;
}
/* 结束关键帧 */
100%{
width: 0;
height: 0;
}
}

边栏推荐
- 软件测试基础-软件测试历史流程,分类,好处,限制
- 09 route guard authenticates URL
- Teach you how to realize pynq-z2 bar code recognition
- Array represents a collection of several intervals. Please merge all overlapping intervals and return a non overlapping interval array. The array must exactly cover all the intervals in the input. 【Le
- Application practice of day13 for loop distinguish the application of traversing break continue
- Advanced learning of MySQL -- Application -- Optimization of other SQL statements
- How to write a resume?
- LeetCode 124. Binary tree maximum path sum - binary tree series question 8
- Halcon: discrete digital OCR recognition
- Handling of difficult and miscellaneous problems during the installation and configuration of qt5.5.1 desktop version (configuring arm compilation Kit)
猜你喜欢

Use pyinstaller to package py files into exe. Precautions and error typeerror:_ get_ sysconfigdata_ name() missing 1...‘ check_ Solutions to exists'

The power of code refactoring: how to measure the success of refactoring

Related configuration commands of Huawei LACP

d3dx9_ How to repair 33.dll? d3dx9_ What if 33.dll is lost?

Redis installation

Uploading multiple attachments from canvas apps to SharePoint

Oracle概念二

d3dx9_ 39.dll how to repair -d3dx9_ 39.dll missing file download

Unity shadow shadow pancaking

Leetcode daily practice (sum of two numbers)
随机推荐
LeetCode 124. Binary tree maximum path sum - binary tree series question 8
Oracle概念三
leetcode 69. Square root of X
DOM object in JS
Event listening mechanism
建立自己的网站(10)
CDH cluster installation
428-二叉树(501.二叉搜索树中的众数、701.二叉搜索树中的插入操作、450.删除二叉搜索树中的节点、669. 修剪二叉搜索树)
[multithreading] thread communication scheduling, waiting set wait(), notify()
d3dx9_ How to repair 32.dll? d3dx9_ Solution to 32.dll missing
Software testing learning - dark horse programmer, software testing learning outline
Hash encryption
What do fast fashion brands care more about?
Community sharing jumpserver in the eyes of senior open source users: a fortress machine for "Crazy" iteration
Lvgl8.x migrating to stm32f4
P4251 [scoi2015] small convex play matrix (still a little confused)
Synchronization mechanism of dual namenodes
The power of code refactoring: how to measure the success of refactoring
Cesium realizes satellite orbit detour
10分钟掌握mysql的安装步骤