基于CSS与HTML的登录界面2

HTML

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="dl.css">
</head>
<body>
    <div class="navbar">
        <div class="nav">
            <ul>
                <li>
                    <a href="javascript">首页</a>
                </li>
                <li>
                    <a href="javascript">热销</a>
                </li>
                <li>
                    <a href="javascript">新品</a>
                </li>
                <li>
                    <a href="javascript">登录</a>
                </li>
                <li>
                    <a href="javascript">注册</a>
                </li>
                <li>
                    <a href="javascript">商品分类</a>
                    <ol>
                        <li><a href="javascript">二级菜单1</a></li>
                        <li><a href="javascript">二级菜单2</a></li>
                        <li><a href="javascript">二级菜单3</a></li>
                        <li><a href="javascript">二级菜单4</a></li>
                        <li><a href="javascript">二级菜单5</a></li>
                        <li><a href="javascript">二级菜单6</a></li>
                    </ol>
                </li>
            </ul>
        </div>
    </div>
    <h1 class="h">注册新用户</h1>
    <form action="" class="fo">
        <h3>用户名</h3>
        <input type="text" placeholder="请输入用户名" class="in"><br>
        <h3>邮箱</h3>
        <input type="text" placeholder="请输入邮箱" class="in"><br>
        <h3>密码</h3>
        <input type="password" placeholder="请输入密码" class="in"><br>
        <h3>收货人</h3>
        <input type="text" placeholder="请输入收货人姓名" class="in"><br>
        <h3>收货电话</h3>
        <input type="text" placeholder="请输入收货电话" class="in"><br>
        <h3>收货地址</h3>
        <input type="text" placeholder="请输入收货地址" class="in"><br>
        <button class="button"> 提交注册</button>
    </form>
</body>
</html>

CSS

*{
    /* 页面初始化,清除元素内外边距 */
    padding: 0;
    margin:  0;
    
}
body{
    background-image: url('234.jpg');
    width: 100vm;
    background-color: #ebebeb;
}
li{
    /* 清除符号 */
    list-style: none;
}
a{
    text-decoration: none;
    color: black;
}
.navbar{
    width: 100%;
    height:70px;
    backdrop-filter: blur(15px) saturate(180%);
	-webkit-backdrop-filter: blur(15px) saturate(180%);
	background-color: rgba(255,255,255,0.4);
	border: 1px solid rgba(209, 213, 219, 0.3);
 }
.navbar .nav{
    width: 1200px;
    height: 100%;
    margin: 0 auto;
}
.navbar .nav ul{
    /* 相对定位 */
    position: relative;
    display: flex;
    justify-content: space-around;
    width: 100%;
    height: 100%;
}
.nav .navbar ul>li{
    width: 100%;
    height: 100%;
}
.navbar .nav ul > li > a{
    /* a元素是行内元素,必须将其转为行内块或者块级才能设置宽度和高度 */
    display: block;
    width: 100%;
    height: 100%;
    /*margin-top: 30px;*/
    line-height: 70px;
    text-align: center;
}
.navbar .nav ul>li ol{
    width: 100%;
    background-color: whitesmoke;
    box-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    transform: scaleY(0);
    transform-origin: 50% 0;
    transition: all  0.3s;
}
.navbar .nav ul>li ol li{
    height: 70px;
    border-bottom: 1px solid white;
}
.navbar .nav ul>li ol li a{
    display: block;
    width: 100%;
    height: 100%;
    /*margin-top: 30px;*/
    line-height: 70px;
    text-align: center;
}
.navbar .nav ul>li ol li:hover{
    background-color: rgba(0,0,0,0.1);
    border-bottom: none;
}
.navbar .nav ul>li:hover ol {
    outline: none;
    border-radius: 10px;
    width: 120%;
    transform: scaleY(1);
    backdrop-filter: blur(15px) saturate(180%);
	-webkit-backdrop-filter: blur(15px) saturate(180%);
	background-color: rgba(255,255,255,0.4);
	border: 1px solid rgba(209, 213, 219, 0.3);
}
.navbar .nav ul>li:hover{
    border-radius: 10px;
    width: 90px;
    font-size: large;
    background-color:rgba(0,0,0,0.04);
    transition: width 1s;
	transition-timing-function: ease-in-out;
}
.h{
    color: rgb(93, 86, 99);
    font-size: 70px;
    text-align: center;
    margin-top: 60px;
}
h3{
    color:rgb(112, 103, 103);
    text-align: left;
    margin-top: 20px;
}
.fo{
    margin-top: 0px;
	position: absolute;
	top: 30%;
	left: 50%;
	margin-left: -160px;
	padding: 5px 40px;
	
}
.in{
    margin-top: 5px;
    background-color:rgba(255, 255, 255, 0.7);
	width: 250px;
	height: 35px;
	border: none;
	margin-bottom: 10px;
	outline: none;
	border-radius: 5px;
	font-size: large;
}
.in:hover{
    background-color: rgba(193, 162, 233,0.4);
    
	transition: 0.2s;
	transition-timing-function: linear;
}
/* From uiverse.io */
.button {
    background-color: rgba(255,255,255,0.7);
    margin-top: 20px;
    text-align: center;
    margin-left: 53px;
    display: inline-block;
    padding: 12px 24px;
    border: 1px solid #4f4f4f;
    border-radius: 10px;
    transition: all 0.2s ease-in;
    position: relative;
    overflow: hidden;
    font-size: 19px;
    color: black;
    z-index: 1;
   }
   
   .button:before {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%) scaleY(1) scaleX(1.25);
    top: 100%;
    width: 140%;
    height: 180%;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    display: block;
    transition: all 0.5s 0.1s cubic-bezier(0.55, 0, 0.1, 1);
    z-index: -1;
   }
   
   .button:after {
    content: "";
    position: absolute;
    left: 55%;
    transform: translateX(-50%) scaleY(1) scaleX(1.45);
    top: 180%;
    width: 160%;
    height: 190%;
    background-color: #3b80b8;
    border-radius: 50%;
    display: block;
    transition: all 0.5s 0.1s cubic-bezier(0.55, 0, 0.1, 1);
    z-index: -1;
   }
   
   .button:hover {
    color: #ffffff;
    border: 1px solid #3b80b8;
   }
   
   .button:hover:before {
    top: -35%;
    background-color: #3b80b8;
    transform: translateX(-50%) scaleY(1.3) scaleX(0.8);
   }
   
   .button:hover:after {
    top: -45%;
    background-color: #3b80b8;
    transform: translateX(-50%) scaleY(1.3) scaleX(0.8);
   }
.sou{
    
}

背景

基本实现了二级列表以及登陆页面,未设置跳转,背景图可换

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值