js+css实现炫酷被外形飞船回收的登录表单页面代码

代码语言:html

所属分类:表单美化

代码描述:js+css实现炫酷被外形飞船回收的登录表单页面代码

代码标签: js css 炫酷 外形 飞船 回收 登录 表单 页面 代码

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en" >

<head>
 
<meta charset="UTF-8">
 


   
<link rel="canonical" href="https://codepen.io/leedeeya/pen/bNGvGWy">
 
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Pixelify+Sans:wght@400..700&display=swap" rel="stylesheet">
 
 
 
<style>
:root {
  --bg-color: white;
  --text-color: black;
  --login-container-bg: #eaeded;
  --input-bg: #eaeded;
  --border-color: transparent;
  --input-bg: white;
  --input-border-color: #eaeded;
  --button-bg: #007bff;
  --button-text-color: white;
  --button-hover: #0056b3;
  --font-main: Arial, sans-serif;
  --link-color: #007bff;
}

input::placeholder {
  opacity: 0.5;
}

.dark-theme {
  --bg-color: black;
  --text-color: #39ff14;
  --login-container-bg: black;
  --input-bg: black;
  --border-color: #39ff14;
  --input-border-color: #39ff14;
  --button-bg: #39ff14;
  --button-text-color: black;
  --button-hover-border: #39ff14;
  --font-main: "Pixelify Sans", sans-serif;
  --link-color: #39ff14;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-main);
  transition: all 0.5s ease;
}

.wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  height: 100vh;
  width: 100%;
  gap: 5px;
  position: relative;
  padding-top: 60px;
}

* {
  box-sizing: border-box;
}

.hint {
  text-align: center;
  width: clamp(200px, 40%, 400px);
  font-size: 12px;
  color: gray;
  margin-top: 10px;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.dark-theme .hint {
  opacity: 0;
  pointer-events: none;
}

.login-container {
  padding: 30px;
  background-color: var(--login-container-bg);
  border-radius: 8px;
  border: 2px solid var(--border-color);
  width: clamp(200px, 40%, 400px);
  text-align: center;
  color: var(--text-color);
  font-family: var(--font-main);
  border-color: var(--border-color);
  transition: all 0.1s linear;
}

.disappear {
  width: 0px;
  opacity: 0;
  overflow: hidden;
  padding: 0px;
  pointer-events: none;
}

body,
label,
input::placeholder,
input,
button {
  background-color: var(--input-bg);
  color: var(--text-color);
  font-family: var(--font-main);
  border-color: var(--border-color);
  transition: all 0.1s linear;
}

label {
  width: 100%;
  display: block;
  text-align: left;
  font-size: 14px;
  margin-top: 10px;
  background-color: transparent;
  color: var(--text-color);
}

input {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  background-color: var(--input-bg);
  color: var(--text-color);
  border: 1px s.........完整代码请登录后点击上方下载按钮下载查看

网友评论0