一个简单的注册页面,如有错误请指正(2.css)

2023-10-28 10:36

本文主要是介绍一个简单的注册页面,如有错误请指正(2.css),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

这段CSS代码定义了页面的样式,让我逐个解释其功能:

1. `* {}`:通配符选择器,用于将页面中的所有元素设置统一的样式。这里将margins和paddings设置为0,以去除默认的边距。

2. `div img {}`:选择页面中所有div元素内的img元素,并设定其样式。这里设置img元素的宽度为视窗宽度的100%(即铺满整个屏幕宽度),高度为15视口高度。

3. `.head`:定义一个类选择器,用于对位于页头的元素进行样式设置。

4. `.head-left`和`.head-right`:这两个类选择器分别用于对页头左侧和右侧的元素进行样式设置。设置了宽度、高度、字体大小、颜色、显示方式、背景颜色和底部边框等样式。

5. `.acc`和`.acc div`:这两个选择器分别用于对显示账号的元素进行样式设置。

6. `.name`和`.name input`:用于对显示姓名的元素进行样式设置。

7. `.add`和`.add div`:用于对显示地址的元素进行样式设置。

8. `.code`和`.code input`:用于对显示邮编的元素进行样式设置。

9. `.names`和`.names div`:用于对显示名字的元素进行样式设置。

10. `.gender span`和`.gender input`:用于对显示性别的元素进行样式设置。

11. `.gan-left`和`.print`:用于对显示性格和印象的元素进行样式设置。

12. `#imgs`:对ID为`imgs`的元素进行样式设置。

13. `.footer`和`.footer-f div`:用于对页脚的元素进行样式设置。

14. `#alert`:对ID为`alert`的元素进行样式设置,包括宽度、高度、背景色、显示和定位等。

15. `.popup-container`、`.popup-container h2`、`.popup-container p`和`.popup-container button`:用于对弹出框的元素进行样式设置,包括定位、背景色、边框、内边距、字体颜色等。

这段代码定义了页面的布局和各种元素的样式,通过对不同的元素应用不同的类选择器或ID选择器,实现了个性化的样式设置。

* {margin: 0;padding: 0;
}div img {width: 100vw;height: 15vh;
}.head {width: 100%;display: flex;
}.head-left {width: 50%;height: 40px;font-size: 12px;color: rgb(162, 162, 162);display: flex;background-color: #ebebeb;justify-content: center;align-items: center;border-bottom: 1px solid rgb(235, 235, 235);
}.head-left div {/* margin-top: 8%; */
}.head-right {width: 50%;height: 40px;font-size: 12px;color: rgb(162, 162, 162);display: flex;justify-content: center;align-items: center;border-bottom: 1px solid rgb(235, 235, 235);
}.head-right div {font-size: 15px;justify-content: center;/* margin-top: 4%; */
}.acc {width: 100%;margin-top: 10%;
}.acc div {width: 50%;font-size: 15px;text-align: center;
}.name {width: 80%;margin-left: 5%;
}.name input {width: 100%;margin-top: 10%;border: none;margin-left: 10%;border-bottom: 1px solid #b1b1b1;outline: none;
}.add {width: 100%;margin-top: 10%;
}.add div {width: 50%;font-size: 15px;text-align: center;
}.code {width: 80%;margin-left: 5%;
}.code input {width: 100%;margin-top: 10%;border: none;margin-left: 10%;border-bottom: 1px solid #b1b1b1;outline: none;
}.names {width: 100%;
}.names div {width: 50%;margin-top: 10%;font-size: 15px;text-align: center;
}.names input {width: 80%;margin-top: 10%;border: none;margin-left: 13%;border-bottom: 1px solid #b1b1b1;outline: none;
}.gender {width: 100%;margin-top: 10%;display: flex;
}.gender span {font-size: 15px;
}.gender input {width: 15px;margin-left: 2%;border-radius: 100%;font-size: 10vh;
}.gan-left {width: 30%;margin-left: 10%;font-size: 15px;
}.print {display: flex;align-items: flex-end;width: 60%;margin-top: 10%;font-size: 15px;margin-left: 10%;
}#imgs {width: 15vw;height: 10vh;border-radius: 50%;display: flex;align-items: center;
}.footer {width: 85%;height: 50px;position: relative;margin-top: 1%;margin-left: 10%;justify-content: center;background-color: #66b1ff;
}.footer-f {width: 100%;position: absolute;}.footer-f div {color: #fff;font-size: 15px;margin-top: 5%;text-align: center;justify-content: center;
}#alert {width: 80%;height: 50px;margin-left: 8%;background-color: #66b1ff;display: none;text-align: center;padding: 10px;text-align: center;position: fixed;top: 100px;
}.popup-container {position: fixed;top: 50%;left: 50%;transform: translate(-50%, -50%);background-color: #fff;border: 1px solid #ccc;padding: 20px;z-index: 9999;
}.popup-container h2 {margin: 0;color: #333;
}.popup-container p {margin: 10px 0;color: #555;
}.popup-container button {padding: 5px 10px;background-color: #66b1ff;color: #fff;border: none;cursor: pointer;
}

 

这篇关于一个简单的注册页面,如有错误请指正(2.css)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/292621

相关文章

Vue3 的 shallowRef 和 shallowReactive:优化性能

大家对 Vue3 的 ref 和 reactive 都很熟悉,那么对 shallowRef 和 shallowReactive 是否了解呢? 在编程和数据结构中,“shallow”(浅层)通常指对数据结构的最外层进行操作,而不递归地处理其内部或嵌套的数据。这种处理方式关注的是数据结构的第一层属性或元素,而忽略更深层次的嵌套内容。 1. 浅层与深层的对比 1.1 浅层(Shallow) 定义

这15个Vue指令,让你的项目开发爽到爆

1. V-Hotkey 仓库地址: github.com/Dafrok/v-ho… Demo: 戳这里 https://dafrok.github.io/v-hotkey 安装: npm install --save v-hotkey 这个指令可以给组件绑定一个或多个快捷键。你想要通过按下 Escape 键后隐藏某个组件,按住 Control 和回车键再显示它吗?小菜一碟: <template

【 html+css 绚丽Loading 】000046 三才归元阵

前言:哈喽,大家好,今天给大家分享html+css 绚丽Loading!并提供具体代码帮助大家深入理解,彻底掌握!创作不易,如果能帮助到大家或者给大家一些灵感和启发,欢迎收藏+关注哦 💕 目录 📚一、效果📚二、信息💡1.简介:💡2.外观描述:💡3.使用方式:💡4.战斗方式:💡5.提升:💡6.传说: 📚三、源代码,上代码,可以直接复制使用🎥效果🗂️目录✍️

【前端学习】AntV G6-08 深入图形与图形分组、自定义节点、节点动画(下)

【课程链接】 AntV G6:深入图形与图形分组、自定义节点、节点动画(下)_哔哩哔哩_bilibili 本章十吾老师讲解了一个复杂的自定义节点中,应该怎样去计算和绘制图形,如何给一个图形制作不间断的动画,以及在鼠标事件之后产生动画。(有点难,需要好好理解) <!DOCTYPE html><html><head><meta charset="UTF-8"><title>06

csu 1446 Problem J Modified LCS (扩展欧几里得算法的简单应用)

这是一道扩展欧几里得算法的简单应用题,这题是在湖南多校训练赛中队友ac的一道题,在比赛之后请教了队友,然后自己把它a掉 这也是自己独自做扩展欧几里得算法的题目 题意:把题意转变下就变成了:求d1*x - d2*y = f2 - f1的解,很明显用exgcd来解 下面介绍一下exgcd的一些知识点:求ax + by = c的解 一、首先求ax + by = gcd(a,b)的解 这个

hdu2289(简单二分)

虽说是简单二分,但是我还是wa死了  题意:已知圆台的体积,求高度 首先要知道圆台体积怎么求:设上下底的半径分别为r1,r2,高为h,V = PI*(r1*r1+r1*r2+r2*r2)*h/3 然后以h进行二分 代码如下: #include<iostream>#include<algorithm>#include<cstring>#include<stack>#includ

如何在页面调用utility bar并传递参数至lwc组件

1.在app的utility item中添加lwc组件: 2.调用utility bar api的方式有两种: 方法一,通过lwc调用: import {LightningElement,api ,wire } from 'lwc';import { publish, MessageContext } from 'lightning/messageService';import Ca

usaco 1.3 Prime Cryptarithm(简单哈希表暴搜剪枝)

思路: 1. 用一个 hash[ ] 数组存放输入的数字,令 hash[ tmp ]=1 。 2. 一个自定义函数 check( ) ,检查各位是否为输入的数字。 3. 暴搜。第一行数从 100到999,第二行数从 10到99。 4. 剪枝。 代码: /*ID: who jayLANG: C++TASK: crypt1*/#include<stdio.h>bool h

uva 10387 Billiard(简单几何)

题意是一个球从矩形的中点出发,告诉你小球与矩形两条边的碰撞次数与小球回到原点的时间,求小球出发时的角度和小球的速度。 简单的几何问题,小球每与竖边碰撞一次,向右扩展一个相同的矩形;每与横边碰撞一次,向上扩展一个相同的矩形。 可以发现,扩展矩形的路径和在当前矩形中的每一段路径相同,当小球回到出发点时,一条直线的路径刚好经过最后一个扩展矩形的中心点。 最后扩展的路径和横边竖边恰好组成一个直

poj 1113 凸包+简单几何计算

题意: 给N个平面上的点,现在要在离点外L米处建城墙,使得城墙把所有点都包含进去且城墙的长度最短。 解析: 韬哥出的某次训练赛上A出的第一道计算几何,算是大水题吧。 用convexhull算法把凸包求出来,然后加加减减就A了。 计算见下图: 好久没玩画图了啊好开心。 代码: #include <iostream>#include <cstdio>#inclu