如何给.md文件添加颜色

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
# 登录页面 ## 1. 页面设计 ### 1.1 页面布局 本登录页面采用左右布局,左侧为登录表单,右侧为背景图。 ### 1.2 颜色搭配 #### 1.2.1 背景色 页面背景色为白色。 #### 1.2.2 文字颜色 登录表单中的文字颜色为黑色。 #### 1.2.3 按钮颜色 登录按钮颜色为蓝色,悬停时变成深蓝色。 ### 1.3 字体选择 本登录页面采用英文字体为Open Sans,中文字体为微软雅黑。 ## 2. 页面元素 ### 2.1 登录表单 登录表单包含两个输入框和一个登录按钮。 #### 2.1.1 输入框 输入框分别为用户名和密码输入框,采用圆角矩形样式。 #### 2.1.2 登录按钮 登录按钮为圆角矩形样式,背景颜色为蓝色,文字颜色为白色。 ### 2.2 背景图 右侧为背景图,采用一张城市夜景图片。 ## 3. 页面效果 ### 3.1 输入框焦点 输入框获取焦点时,边框颜色变为蓝色。 ### 3.2 按钮悬停 鼠标悬停在登录按钮上时,背景颜色变为深蓝色。 ### 3.3 登录失败提示 如果用户输入的用户名或密码不正确,则在登录表单下方显示登录失败提示。 ### 3.4 响应式设计 本登录页面采用响应式设计,适配不同屏幕大小的设备。 ## 4. 页面代码 以下为本登录页面的HTML和CSS代码: ```html <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Login Page</title> <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'> <style type="text/css"> /* Reset styles */ body { margin: 0; padding: 0; } /* Body styles */ body { background-color: #fff; font-family: 'Open Sans', sans-serif; font-size: 16px; color: #000; } /* Container styles */ .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; height: 100vh; } /* Form styles */ form { display: flex; flex-direction: column; background-color: #fff; padding: 20px; border: 1px solid #ccc; border-radius: 5px; box-shadow: 0px 0px 5px #ccc; margin-right: 20px; width: 300px; max-width: 100%; box-sizing: border-box; } form input { margin-bottom: 20px; padding: 10px; border: 1px solid #ccc; border-radius: 5px; font-family: 'Open Sans', sans-serif; font-size: 16px; color: #000; box-sizing: border-box; } form input:focus { border-color: #0072C6; } form button { background-color: #0072C6; color: #fff; padding: 10px; border: none; border-radius: 5px; font-family: 'Open Sans', sans-serif; font-size: 16px; cursor: pointer; } form button:hover { background-color: #005ea2; } /* Background styles */ .background { background-image: url(https://cdn.pixabay.com/photo/2016/11/29/07/09/yorkshire-1850116_960_720.jpg); background-size: cover; background-position: center; height: 100vh; width: 100%; position: absolute; top: 0; right: 0; z-index: -1; } /* Login error styles */ .login-error { color: red; margin-top: 10px; } /* Media query for small screens */ @media (max-width: 768px) { .container { flex-direction: column; height: auto; } form { margin-right: 0; margin-bottom: 20px; } } </style> </head> <body> <div class="container"> <form> <label for="username">Username</label> <input type="text" id="username" name="username" placeholder="Enter your username" required> <label for="password">Password</label> <input type="password" id="password" name="password" placeholder="Enter your password" required> <button type="submit">Login</button> <p class="login-error">Incorrect username or password</p> </form> <div class="background"></div> </div> </body> </html> ``` ## 5. 页面截图 以下为本登录页面在不同屏幕上的截图: ### 5.1 大屏幕 ![login-page-desktop](https://i.imgur.com/ZzHkX9c.png) ### 5.2 小屏幕 ![login-page-mobile](https://i.imgur.com/1WkG5J5.png)

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

一只小小狗

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值