Web界面设计学习笔记(2):css表单布局

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication1.WebForm1" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>无标题页</title> <link rel="Stylesheet" type="text/css" href="css2/reset.css" mce_href="css2/reset.css" /> <style type="text/css" mce_bogus="1"> span { display: inline-block; width: 200px; border: solid 1px black; } input { width: 120px; float: right; } label { width: 70px; float: left; } span.test { width: 610px; } span.test input { width: 531px; float: right; } </style> </head> <body> <form id="form1" runat="server"> <div style="width: 620px"> <span><label>测试</label><input /></span> <span><label>测试</label><input /></span> <span><label>测试</label><input /></span> <span><label>测试</label><input /></span> <span><label>测试</label><input /></span> <span><label>测试</label><input /></span> <span class="test"><label>测试</label><input /></span> </div> </form> </body> </html>

你可能感兴趣的:(Web,css,测试,webform,float,stylesheet)