当前位置: 首页 > news >正文

HTML+CSS实训——Day02——仿一个网易云音乐的登陆界面

仓库链接:https://github.com/MengFanjun020906/HTML_SX

前言

今天要继续完成我们的音乐软件了,昨天写完了封面,今天该完成开屏广告和登陆界面了。

登陆界面代码

<!DOCTYPE html>
<html lang="en">
<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><style>body{background-color: red;}h2{color: white;font-weight: 400;display: flex;align-items: center;justify-content: center;margin-top: 160px;margin-bottom: 50px;}.logo {/* 设置图片的大小 */width: 30px;height: 30px;margin-right: 5px;}/* css选择器可以灵活运用 */.from>input {width: 280px;height: 36px;border-radius: 25px;border: none;margin-bottom: 6px;/* 清除轮廓 */outline: none;}button{width: 280px;height: 36px;border-radius: 20px;border: none;font-size: 20px;background-color: red;border: 2px solid white;color: white;font-weight: 200;}.from{display: flex;justify-content: center;flex-wrap: wrap;/* 弹性子元素默认不换行 */}/* 子代选择器 */</style>
</head><body><h2><img src="img/logo.png" class="logo" alt="加载">丁真音乐</h2><div class="from"><input type="text" class="uname"><br><input type="password" class="upwd"><button class="login"> 登陆</button></div>
</body>
</html>

在这里插入图片描述

开屏广告代码

<!DOCTYPE html>
<html lang="en"><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>
</head>
<style>body {background-image: url('img/sxc.jpeg');/* 背景图片大小,宽 高 */background-size: 375px 667px;}div {color: white;position: fixed;right: 30px;bottom: 40px;background-color: #ffc0cbab;width: 80px;text-align: center;/* 文本默认在行高中垂直居中,所以把行高和元素的高度设成一样的,看起来就像文本在元素中垂直居中一样 */height: 30px;line-height: 30px;/* 圆角:设置的数值是圆的半径 */border-radius: 15px;font-size: 14px;}
</style><body><div>5s 跳过</div>
</body></html>

具体是啥图片我就不在这里展示了,这是一个图片界面加上跳过按钮。
在css里面加入这些

        .uname{background-image: url("img/uname.png");background-size: 40px 40px; /* 控制重复 */background-repeat: no-repeat;/* 控制位置 */background-position: right center;}   .upwd{background-image: url("img/upwd.png");background-size: 40px 40px; /* 控制重复 */background-repeat: no-repeat;/* 控制位置 */background-position: right center;}  

感觉更美观了
在这里插入图片描述

加入下面的隐私政策

html

 <div class="agreement"><div class="left"><input type="checkbox" name="" id="">同意</div><div class="right"><span>《服务条款》</span><span> 《隐私政策》</span><span>《儿童隐私政策》</span><span>《中国移动认证服务协议》</span></div>

css

        .agreement>.left {width: 70px;margin-left: 30px;}.agreement>.right {display: flex;flex-wrap: wrap;margin-left: 20px;}.agreement {font-size: 12px;color: white;display: flex;margin-top: 20px;margin-left: auto;margin-right: auto;}

在这里插入图片描述

在下面添加图标

HTML

    <div class="icon"><i class="weixin"></i><i class="qq"></i><i class="weibo"></i><i class="apple"></i></div>

CSS

        .icon {position: fixed;left: 0;right: 0;bottom: 30px;display: flex;justify-content: center;margin-top: 20px;}.icon>i{width: 50px;height: 50px;background-size: 40px;background-repeat: no-repeat;background-position: center center;background-color: white;border-radius:25px; ;margin-left: 10px;margin-right: 10px;}.weixin{background-image: url(img/weixin.png);}.qq{background-image: url(img/qq.png);}.weibo{background-image: url(img/weibo.png);}.apple{background-image: url(img/apple.png);}
http://www.lryc.cn/news/92233.html

相关文章:

  • css蓝桥杯--电影院排座位
  • c++学习——多态
  • Java SPI机制及原理详解
  • 不压缩打包layui
  • 过去、现在及未来
  • leetcode701. 二叉搜索树中的插入操作(java)
  • Docker的容器管理操作
  • 计算机组成原理——中央处理器
  • tidb变更大小写敏感问题的总结
  • 法规标准-UN R158标准解读
  • 160个CrackMe之002
  • 3. 响应状态码及Response对象的status_code属性
  • MIME 类型列表 03
  • SpringBoot项目登录并接入MFA二次认证
  • 算法与数据结构(三)
  • 亚马逊云科技出海日,让数字经济出海扩展到更多行业和领域
  • Pb协议的接口测试
  • 2. 分布式文件系统 HDFS
  • 借助金融科技差异化发展,不一样的“破茧”手法
  • typescript中type、interface的区别
  • Ingress详解
  • 【递归算法的Java实现及其应用】
  • 2023年度第四届全国大学生算法设计与编程挑战赛(春季赛)
  • 如何用PHP获取各大电商平台的数据
  • 一站式完成车牌识别任务:从模型优化到端侧部署
  • Linux4.8Nginx Rewrite
  • DHT11温湿度传感器
  • RestTemplate超简单上手
  • 监控系统设计原则及实现目标
  • VulnHub项目:MONEYHEIST: CATCH US IF YOU CAN