高颜值登录页面第 2 波(CV即可,带动态背景!)

你好,我是云桃桃。

一个希望帮助更多朋友快速入门 WEB 前端的程序媛。大专生,一枚程序媛,感谢关注。回复 “前端基础题”,可免费获得前端基础 100 题汇总,回复 “前端工具”,可获取 Web 开发工具合集

268篇原创内容-gzh

后台回复“前端工具”可获取开发工具,持续更新中

后台回复“前端基础题”可得到前端基础100题汇总,持续更新中

昨天写了第一波纯 HTML + CSS 手机端登录界面高颜值登录页面(一键复制),今天呢,观察了 7个 APP 的登录界面,发现大多是手机号登录或者微信登录,于是我决定优化界面,来个第 2 波。

本次一共有 2 种,一种是动态背景的,一种是仿幕布 APP 的。

代码可拿走随便用~那一起来看看吧。

01 动态背景

静态效果如下图:

图片

动态背景效果如下图:

图片

代码如下。

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>login 01</title>
    <link rel="stylesheet" href="css/global.css" />
    <link rel="stylesheet" href="css/login1.css" />
    <style></style>
  </head>
  <body>
    <div class="login-page">
      <div class="login-page__main">
        <div class="login-page__title">登录</div>
        <!-- 登录表单 -->
        <form action="">
          <div class="login-page__form">
            <section class="rel login-page__form-group">
              <i class="iconfont icon-user"></i>
              <input class="login-page__form-group-input" name="tel" type="text" placeholder="请输入手机号" />
            </section>
            <section class="rel login-page__form-group">
              <i class="iconfont icon-pwd"></i>
              <input class="login-page__form-group-input" name="pwd" type="text" placeholder="请输入密码" />
            </section>
            <section class="login-page__form-group login-page__guide">
              <a href="#">忘记密码?</a>
              <a href="#">没有账号,去注册</a>
            </section>
            <div class="login-page__submit-btn">登录</div>
          </div>
        </form>
        <!-- 其他登录方式 -->
        <div class="login-methods">
          <p class="login-methods__description">—其他方式登录—</p>
          <section class="login-methods__options">
            <a class="iconfont icon-weixin login-methods__icon--weixin" href="#"></a>
            <a class="iconfont icon-qq login-methods__icon--qq" href="#"></a>
          </section>
        </div>
      </div>
    </div>
  </body>
</html>

global.css

html {
  /* 750px 的设计图,1rem = 100px */
  font-size: calc(100 * 100vw / 750);
}

* {
  margin: 0;
  padding: 0;
  color: #272636;
  font-size: 0.24rem;
  -webkit-tap-highlight-color: transparent;
}


a,
img {
  -webkit-touch-callout: none;
}

body {
  -webkit-overflow-scrolling: touch;
}

body::-webkit-scrollbar {
  width: 0px;
}

textarea::-webkit-scrollbar {
  width: 0px;
}

div::-webkit-scrollbar {
  width: 0px;
}

img {
  display: block;
  border: none 0;
  width: 100%;
}

input {
  border-radius: 0px;
}

input:focus {
  outline: none;
}

input,
textarea {
  border: 0 none;
  display: block;
}

input[type=search] {
  -webkit-appearance: none;
}

.d-block {
  display: block;
}

.d-none {
  display: none;
}

.v-none {
  visibility: hidden;
}

/*文字和li重置*/
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: normal;
}

a {
  text-decoration: none;
}

li {
  list-style: none;
}

.rel {
  position: relative;
}

.abs {
  position: absolute;
}

.txt-over1 {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.txt-over2 {
  display: -webkit-box;
  overflow: hidden;
  text-overflow: ellipsis;
  word-wrap: break-word;
  white-space: normal !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

@font-face {
  font-family: 'iconfont';
  src: url('../font/iconfont.ttf') format('truetype');
}

.iconfont {
  font-family: "iconfont" !important;
  font-style: normal;
  -webkit-font-smoothing: antialiased;
  -webkit-text-stroke-width: 0.2px;
}

.icon-pwd:before {
  content: "\e626";
}

.icon-user:before {
  content: "\e639";
}

.icon-weixin:before {
  content: "\e6b3";
}

.icon-weixin2:before {
  content: "\e600";
}

.icon-qq:before {
  content: "\e73e";
}

.icon-yanzhengma:before {
  content: "\e604";
}

.icon-more:before {
  content: "\e60d";
}

页面所用动态背景图片的素材如下:

图片

login1.css

:root {
  --main-color: #f2729a;
}

.login-page {
  width: 100vw;
  height: 100vh;
  /* background: linear-gradient(to bottom, rgb(255, 175, 189), rgb(255, 195, 160)); */
  background: url('../img/bg1.jpg') no-repeat -300px -300px rgba(0, 0, 0, 0.3);

  display: flex;
  align-items: center;
  justify-content: center;
  animation: bgGif 10s infinite alternate ease-in-out;
}

@keyframes bgGif {
  0% {
    background-position: -800px -300px;
  }

  25% {
    background-position: -1200px -600px;
  }

  50% {
    background-position: -1600px -1000px;
  }

  75% {
    background-position: -800px -1900px;
  }

  100% {
    background-position: -2000px -300px;
  }
}

.login-page__main {
  width: 6.6rem;
  box-sizing: border-box;
  border-radius: 10px;
  background-color: #fff;
  padding: 0.4rem 0.6rem;
}

.login-page__title {
  font-size: 0.42rem;
  color: var(--main-color);
  letter-spacing: 3px;
  font-weight: bold;
  line-height: 0.6rem;
  margin-bottom: 0.2rem;
}

.login-page__form {
  margin-bottom: 0.5rem;
}


.login-page__form-group {
  margin-bottom: 0.2rem;
}

.login-page__form-group-input {
  background-color: #f5f5f5;
  width: 5.4rem;
  height: 0.8rem;
  box-sizing: border-box;
  padding: 0rem 0.2rem 0rem 0.6rem;
  font-size: 0.3rem;
}


.login-page__form-group-input::placeholder {
  font-size: 0.3rem;
  line-height: 0.8rem;
}

.login-page__form-group .iconfont {
  position: absolute;
  font-size: 0.34rem;
  top: 0.23rem;
  left: 0.1rem;
  color: var(--main-color);
}

.login-page__guide {
  display: flex;
  justify-content: space-between;
}

.login-page__guide a {
  font-size: 0.25rem;
  color: #666;
}

.login-page__submit-btn {
  font-size: 0.4rem;
  text-align: center;
  color: #fff;
  letter-spacing: 0.08rem;
  height: 0.86rem;
  line-height: 0.86rem;
  border-radius: 0.43rem;
  background: linear-gradient(to right, #f8c7c4 1%, #f2729a 100%);
}

.login-methods__description {
  text-align: center;
  color: #666;
  font-size: 0.2rem;
  line-height: 0.3rem;
}

.login-methods__options {
  width: 1.9rem;
  margin: 0.2rem auto 0rem auto;
  display: flex;
  justify-content: space-between;
}

.login-methods__options .iconfont {
  font-size: 0.6rem;
  margin-right: 0.2rem;
}

.login-methods__options .iconfont:last-child {
  margin-right: 0px;
}

.login-methods__icon--weixin {
  color: #3eb600;
}

.login-methods__icon--qq {
  color: #559dfc;
}

02 (仿幕布导图APP)

效果如图:

代码如下:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>login 02</title>
    <link rel="stylesheet" href="css/global.css" />
    <link rel="stylesheet" href="css/login2.css" />
    <style></style>
  </head>
  <body>
    <div class="login-page">
      <div class="login-page__main">
        <img class="login-logo" src="./img/yuntaotao.png" alt="" />
        <!-- 登录表单 -->
        <form action="">
          <div class="login-page__form">
            <section class="rel login-page__form-group">
              <input class="login-page__form-group-input" name="tel" type="text" placeholder="输入手机号" />
            </section>
            <section class="rel login-page__form-group">
              <input class="login-page__form-group-input" name="verCode" type="text" placeholder="验证码" />
              <span class="abs login-page__form-group--sendcode-btn">发送验证码</span>
            </section>
            <section class="login-page__form-group login-page__guide">
              <input type="checkbox" name="agree" value="agree" />
              <span>我已阅读并同意&nbsp;</span>
              <a href="#">服务条款、隐私政策</a>
            </section>
            <div class="login-page__submit-btn">登录</div>
          </div>
        </form>
        <!-- 其他登录方式 -->
        <div class="login-methods">
          <section class="login-methods__options">
            <a class="iconfont icon-weixin2 login-methods__icon--weixin" href="#"></a>
            <a class="iconfont icon-more login-methods__icon--more" href="#"></a>
          </section>
        </div>
      </div>
    </div>
  </body>
</html>

global.css 同上个页面

login2.css

:root {
  --main-color: #4a00e0;
}

.login-page {
  width: 100vw;
  height: 100vh;
  background-color: #fefefe;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-page__main {
  width: 5.8rem;
  box-sizing: border-box;
  border-radius: 10px;
  background-color: #fff;
}

.login-logo {
  width: 1.36rem;
  margin: 0rem auto 1.5rem auto;
  border: 3px solid var(--main-color);
  border-radius: 50%;
}

.login-page__form-group {
  margin-bottom: 0.24rem;
}

.login-page__form-group-input {
  background-color: #f4f4f4;
  width: 100%;
  height: 1rem;
  box-sizing: border-box;
  padding: 0rem 0.2rem;
  border-radius: 0.1rem;
  font-size: 0.33rem;
}

.login-page__form-group-input[name='verCode'] {
  padding: 0rem 2.8rem 0px 0.2rem;
}

.login-page__form-group--sendcode-btn {
  color: #8c8f94;
  right: 0.3rem;
  line-height: 1rem;
  top: 0px;
  font-size: 0.33rem;
}

.login-page__form-group-input::placeholder {
  color: #868686;
  font-size: 0.3rem;
  line-height: 0.8rem;
}

.login-page__guide {
  display: flex;
  justify-content: center;
  font-size: 0.24rem;
  margin-top: 1rem;
}

.login-page__guide input[type='checkbox'] {
  cursor: pointer;
  position: relative;
  width: 0.32rem;
  height: 0.32rem;
  accent-color: var(--main-color);
  margin-right: 0.1rem;
}

.login-page__guide a {
  color: var(--main-color);
  text-decoration: underline;
}

.login-page__submit-btn {
  font-size: 0.4rem;
  text-align: center;
  color: #fff;
  line-height: 1rem;
  border-radius: 0.1rem;
  background: linear-gradient(to right, #8e2de2, #4a00e0);
}

.login-methods__options {
  width: 2.6rem;
  margin: 1.7rem auto 0rem auto;
  display: flex;
  justify-content: space-between;
}

.login-methods__options .iconfont {
  font-size: 0.6rem;
  width: 0.86rem;
  margin-right: 0.2rem;
  border-radius: 50%;
  line-height: 0.86rem;
  text-align: center;
  color: #fff;
}

.login-methods__options .iconfont:last-child {
  margin-right: 0px;
}

.login-methods__icon--weixin {
  background: #3eb600;
}

.login-methods__icon--more {
  background: #d7d7d7;
}

喜欢就点个赞吧,后续还会继续更新其他模板的代码。

更多前端系列内容可以go公众.h:云桃桃

  • 10
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: 在图像处理中,滤是一种常见的操作,用于去除噪声、平滑图像或强调图像特征等。在实际应用中,通常需要对图像进行非线性滤,因为在某些情况下,线性滤可能无法满足要求。 然而,对于某些应用场景,需要在保持图像清晰度和对比度的同时对其进行滤。在这种情况下,约束非线性滤是一种非常有效的技术。约束非线性滤通过在滤过程中添加额外的约束条件,如平滑或保留边缘,以达到更好的滤效果。这种方法可以在一定程度上避免由于非线性滤引起的图像模糊、失真等问题。 另一个需要非线性滤背景是在图像处理中保留图像的结构信息。在一些应用场景中,如医学影像处理、计算机视觉等领域,需要保留图像中的结构信息,如边缘、角点等,以便进一步的分析和处理。在这种情况下,非线性滤是一种非常有效的工具,可以帮助保留这些重要的结构信息,同时去除噪声和平滑图像。 ### 回答2: 约束、非线性滤是一种滤技术,用于在信号或图像处理中去除噪声和增强图像质量。传统线性滤方法如平滑滤器、边缘增强滤器等只能有效处理简单信号与图像,而对于复杂的非线性特征、强噪声或图像细节的保留却表现出困难。 约束指的是在进行滤时根据问题背景对处理结果进行一定限制和约束。例如,在图像处理中,我们可能希望在去噪的同时保留图像的边缘、纹理细节等重要特征。这种约束可以通过约束方程或者目标函数来定义,使用特定的评价指标进行优化。 非线性滤方法则是对图像进行非线性处理,与线性滤方法相比,更能适应算法的复杂性。非线性滤方法可以通过灰度变换、自适应窗口和多尺度处理等方式,充分利用图像的局部特征,更好地处理图像的细节和边缘。 约束、非线性滤背景和必要性主要有以下几点: 1. 图像噪声去除和增强特征:在图像处理中,图像可能受到各种类型和程度的噪声污染,约束、非线性滤可以更好地去除这些噪声,同时保留图像的细节和特征,提高图像质量。 2. 边缘保护和边缘增强:线性滤方法往往会模糊图像的边缘,而约束、非线性滤可以通过加权特定区域或增强边缘的方式来优化边缘保护和增强,使得图像边缘更加清晰和准确。 3. 适应复杂场景:约束、非线性滤适用于处理各种复杂场景,如低光照条件下的图像增强、高动态范围图像的处理等,通过优化约束条件和非线性函数,可以更好地适应不同场景下的图像特征处理需求。 4. 处理非线性特征:图像中往往存在非线性的特征,如纹理、形状等,传统线性滤方法不能很好地处理这些特征。而约束、非线性滤方法可以更好地捕捉和增强这些非线性特征,提高图像的可视质量。 综上所述,约束、非线性滤在信号和图像处理中具有重要的背景和必要性,对于噪声去除和图像增强具有重要的应用价值。 ### 回答3: 约束、非线性滤是一种用于图像处理和信号处理的重要方法。在实际应用中,图像可能会受到各种噪声污染或含有复杂的背景信息,因此需要使用滤算法对图像进行降噪处理或提取出感兴趣的目标。 传统的线性滤方法如高斯滤器对图像进行平滑处理时,在保持图像细节的同时也会导致边缘模糊。而约束的非线性滤通过引入附加约束条件,能够更好地平衡图像的平滑性和细节保持性,提高滤效果。 约束、非线性滤背景主要可以从以下几个方面来分析: 首先,图像处理中的噪声通常是非线性和非高斯分布的,这导致传统的线性滤难以去除这种噪声。约束、非线性滤通过引入非线性因子,能够更好地逼近真实噪声的分布,提高去噪效果。 其次,图像中常常存在各种复杂的背景信息,例如纹理、边缘等。传统的线性滤方法对于保留这些细节具有一定的局限性。而约束的非线性滤方法可以根据图像自身特点,根据纹理、边缘等信息进行自适应的滤处理,提高图像的清晰度和质量。 最后,约束的非线性滤方法还可以在处理过程中引入先验知识和经验规则,根据特定的应用需求进行定制化滤。例如,对于医学图像处理,可以根据不同病变的特点设计约束条件,提高病变区域的检测和分析效果。 综上所述,约束、非线性滤是一种既能够保持图像细节又能够降低噪声的强大工具。在图像处理和信号处理领域有着广泛的应用。通过引入约束条件和非线性因子,可以在平衡图像的平滑性和细节保持性方面取得更好的效果。

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值