百度新闻html css代码,仿百度首页XHTML+CSS代码

百度一下,就就知道了

/* *{margin:0px;padding:0px;font-size:14px;} 不要使用*,会影响整体的速度,只对需要重置的标签进行定义就可以了,还有当一个属性的数值为 0 时可以不加px,属性中的最后一个分号可以不写(个人习惯) */

body,div,form,input{font-size:14px;margin:0;padding:0}

/* a{color:rgb(0, 0, 204);} 我个人还是不习惯使用rgb表示颜色,1.不容易记 2.难于书写 3.不能简写,字符多,个人还是习惯使用十六进制表示颜色你可以去了解一下“web安全色” */

a{color:#0000cc}

a:active{color:#f90}

/* #top_right{position:absolute;top:0px;padding:6px 10px;right:0px;font-size:12px;color:rgb(153, 153, 153);} 重复之前讲的 */

#top_right{color:#999;font-size:12px;padding:6px 10px;position:absolute;right:0;top:0}

#top_right a{font-size:12px}

/*头部结束*/

#main{margin:25px auto 100px auto;padding:0 35px;width:530px}

#main h1{margin-bottom:4px;text-align:center}

#main h1 a img{border:none}

#main ul{list-style-type:none;padding:0 0 0 45px;width:410px}

#main ul li{float:left;marg

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
以下是ASP.NET网页设计迅捷英翔公司登入注册的代码CSS样式的示例: ASP.NET登入页面代码: ```html <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="WebApplication1.Login" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>登入页面</title> <link href="Styles/Login.css" rel="stylesheet" /> </head> <body> <form id="form1" runat="server"> <div class="login-container"> <h2>欢迎登入</h2> <div class="form-group"> <label for="username">用户名:</label> <asp:TextBox ID="username" runat="server"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="username" ErrorMessage="用户名不能为空"></asp:RequiredFieldValidator> </div> <div class="form-group"> <label for="password">密码:</label> <asp:TextBox ID="password" runat="server" TextMode="Password"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="password" ErrorMessage="密码不能为空"></asp:RequiredFieldValidator> </div> <asp:Button ID="loginButton" runat="server" Text="登入" OnClick="loginButton_Click" /> <div class="register-link"> <a href="Register.aspx">注册</a> </div> </div> </form> </body> </html> ``` ASP.NET登入页面CSS样式: ```css .login-container { width: 400px; margin: 0 auto; padding: 50px 30px; border: 1px solid #ccc; background: #f9f9f9; } .login-container h2 { text-align: center; margin-bottom: 20px; } .form-group { margin-bottom: 20px; } .form-group label { display: inline-block; width: 100px; } .form-group input[type="text"], .form-group input[type="password"] { width: 240px; padding: 5px; border: 1px solid #ccc; } .register-link { text-align: center; margin-top: 20px; } .register-link a { color: #0066cc; text-decoration: none; } ``` ASP.NET注册页面代码: ```html <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Register.aspx.cs" Inherits="WebApplication1.Register" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>注册页面</title> <link href="Styles/Login.css" rel="stylesheet" /> </head> <body> <form id="form1" runat="server"> <div class="login-container"> <h2>用户注册</h2> <div class="form-group"> <label for="username">用户名:</label> <asp:TextBox ID="username" runat="server"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="username" ErrorMessage="用户名不能为空"></asp:RequiredFieldValidator> </div> <div class="form-group"> <label for="password">密码:</label> <asp:TextBox ID="password" runat="server" TextMode="Password"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="password" ErrorMessage="密码不能为空"></asp:RequiredFieldValidator> </div> <div class="form-group"> <label for="confirmPassword">确认密码:</label> <asp:TextBox ID="confirmPassword" runat="server" TextMode="Password"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="confirmPassword" ErrorMessage="确认密码不能为空"></asp:RequiredFieldValidator> <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="password" ControlToValidate="confirmPassword" ErrorMessage="两次密码输入不一致"></asp:CompareValidator> </div> <asp:Button ID="registerButton" runat="server" Text="注册" OnClick="registerButton_Click" /> <div class="login-link"> <a href="Login.aspx">登入</a> </div> </div> </form> </body> </html> ``` ASP.NET注册页面CSS样式: ```css .login-container { width: 400px; margin: 0 auto; padding: 50px 30px; border: 1px solid #ccc; background: #f9f9f9; } .login-container h2 { text-align: center; margin-bottom: 20px; } .form-group { margin-bottom: 20px; } .form-group label { display: inline-block; width: 100px; } .form-group input[type="text"], .form-group input[type="password"] { width: 240px; padding: 5px; border: 1px solid #ccc; } .login-link { text-align: center; margin-top: 20px; } .login-link a { color: #0066cc; text-decoration: none; } ```

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值