zoukankan      html  css  js  c++  java
  • 用fieldset标签来实现类似WinForm中GroupBox布局效果

    fieldset标签以前都没用过,确切的讲是听都没听说过,今天参考ASP.Net Ajax的Document,看到它在举例子的时候网页中出现了类似于WinForm中GroupBox的东西,感觉布局一下子显得很有条理。感觉很不错,查看了源文件才知道原来是用了fieldset标签,其格式如下
    <fieldset>
     
    <legend>fieldset的标题,可以不要</legend>
    </fieldset>

    其实我个人认为如果在用户注册的界面上使用用fieldset布局可能效果会好一点,有些网站的必填项和选填项是混在一起的,如果用fieldset分开个人感觉更人性化吧。
    <fieldset>
        
    <legend>用户注册必填选项</legend>
        
    <ul>
            
    <li style="50px; display:inline;">
                
    <asp:Label ID="Label1" Width="80px" runat="server" Text="用户名"></asp:Label></li>
            
    <li style="150px; display:inline;">
                
    <asp:TextBox ID="tbx_username" runat="server" Width="150px"></asp:TextBox></li>
        
    </ul>
        
    <ul>
            
    <li style="50px; display:inline;">
                
    <asp:Label ID="Label2" Width="80px" runat="server" Text="密码"></asp:Label></li>
            
    <li style="150px; display:inline;"><asp:TextBox ID="tbx_password" runat="server" Width="150px"></asp:TextBox></li>
        
    </ul>
        
    <ul>
            
    <li style="50px; display:inline;">
                
    <asp:Label ID="Label3" Width="80px" runat="server" Text="密码确认"></asp:Label></li>
            
    <li style="150px; display:inline;"><asp:TextBox ID="tbx_confirm" runat="server" Width="150px"></asp:TextBox></li>
        
    </ul>
        
    <ul>
            
    <li style="50px; display:inline;">
                
    <asp:Label ID="Label4" Width="80px" runat="server" Text="电子邮件"></asp:Label></li>
            
    <li style="150px; display:inline;"><asp:TextBox ID="tbx_email" runat="server" Width="150px"></asp:TextBox></li>
        
    </ul>
    </fieldset>
    <fieldset>
        
    <legend>用户注册选添项</legend>
        
    <ul>
            
    <li style="50px; display:inline;">
                
    <asp:Label ID="Label5" Width="80px" runat="server" Text="真实姓名"></asp:Label></li>
            
    <li style="150px; display:inline;">
                
    <asp:TextBox ID="tbx_realname" runat="server" Width="150px"></asp:TextBox></li>
        
    </ul>
    </fieldset>
  • 相关阅读:
    java 数据结构(八):Iterator接口与foreach循环
    java 数据结构(七):Collection接口
    java 数据结构(六):数组与集合
    java中equals(),hashcode()和==的区别
    Android中的IPC方式
    Android-如何防止apk被反编译
    Android-管理应用的内存(转)
    102. Binary Tree Level Order Traversal
    对于开发团队管理的理解
    TCP三次握手和四次挥手的全过程
  • 原文地址:https://www.cnblogs.com/interboy/p/713592.html
Copyright © 2011-2022 走看看