第一篇:初学前端,网易注册界面实例

本文是初学者的前端实践指南,通过详细步骤解析如何使用HTML和CSS重现网易注册界面的效果,涵盖基本布局、样式设计和交互实现。
摘要由CSDN通过智能技术生成
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>网易注册界面</title>
    <style>
        body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,
        form,fieldset,legend,input,textarea,p,blockquote,th,td{
            margin:0;padding:0
        }
        a{
            text-decoration: none;
            color:#ccc;
        }

        body{
            font-size: 12px;
        }

        .header{
            width:960px;
            height:80px;
            margin:0 auto;
            padding-top: 28px;  /* .header和.logo是父子关系,建议用 padding */
            box-sizing:border-box; /* 保持盒子在padding增加后不变形 */
        }
        .header .logo{
            width:644px;
            height:27px;
            background-image: url("images/glb_v2.png");
            background-repeat: no-repeat;  /* 让图像不平铺 */
            background-position:0px 0px;  /* 让图像从什么位置开始显示 */
            float:left;
        }
        .header .logo a{
            width:125px;
            height:27px;
            display:inline-block; /* 把a标签转换为行内块级 */
        }
        .header .links{
            width:200px;
            height:27px;
            float:right;
            text-align:right; /* 设置.links 盒子内容的对齐方式 */
        }
        .header .links a{
            color:#ccc;
            line-height:27px; /* 设置a标签文字的行高等于它的父元素,已达到文字居中 */
        }
        .content{
            width:960px;
            height:600px;
            margin:0 auto;
        }
        .content .top{
            width:960px;
            height:38px;
            background:url("images/line-center.png") repeat-x;
        }
        .top .top-left{
            width:960px;
            height:38px;
            background:url("images/line-left.png") no-repeat left 0; /* 插入背景图片 不平铺 左显示 */
        }
        .top h1{
            color:white;
            font-size:12px;
            line-height:38px; /* 设置行高和它的父元素.left一样高,以达到文字居中效果 */
            text-indent:2em;  /* 首行缩进2个文字的距离 */
        }
        .top .t
  • 0
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值