原文章:
Customizable Home Pages
      
       现在似乎每个主要的网站都可以个性化的定制,“my”(我的),主页(my.yahoo.com,my.msn.com,my.ebay.com …). 这实际上很容易实现,只要你舍弃了以Table为基本框架的网页设计。看看下面的设计:
       你可能会花费一整天来设置你的页面布局,但最后却一团糟,难以更新,编码。或者你可以使用DIV标签,使用一半的HTML,并用CSS来处理所有的设计样式。
 
ASP.NET中定制网站首页<div class="main">
ASP.NET中定制网站首页    
<div class="left">
ASP.NET中定制网站首页        
<div class="leftSubheadDark" runat="server" id="hdStocks">Stocks</div>
ASP.NET中定制网站首页        
<div class="leftSubDark" runat="server" id="Stocks">
ASP.NET中定制网站首页            DJIA 10087.51 -191.24
ASP.NET中定制网站首页            
<br>
ASP.NET中定制网站首页            NASDAQ 1908.15 -38.56
ASP.NET中定制网站首页            
<br>
ASP.NET中定制网站首页            YHOO 32.46 -1.00
ASP.NET中定制网站首页            
<br>
ASP.NET中定制网站首页            
<asp:LinkButton Runat="server" ID="HideStocks">Hide</asp:LinkButton>
ASP.NET中定制网站首页        
</div>
ASP.NET中定制网站首页        
<div class="leftSubheadLight" runat="server" id="hdDates">Events</div>
ASP.NET中定制网站首页        
<div class="leftSubLight" runat="server" id="Dates"><b>July 4:</b> Independence Day
ASP.NET中定制网站首页            
<br>
ASP.NET中定制网站首页            
<b>December 25:</b> Christmas<br>
ASP.NET中定制网站首页            
<b>January 1:</b> New Years Day<br>
ASP.NET中定制网站首页            
<asp:LinkButton Runat="server" ID="hideDates">Hide</asp:LinkButton></div>
ASP.NET中定制网站首页        
<div class="leftSubheadDark" runat="server" id="hdWeather">Weather</div>
ASP.NET中定制网站首页        
<div class="leftSubDark" runat="server" id="Weather">Lincoln, NE : 53/72 F
ASP.NET中定制网站首页            
<br>
ASP.NET中定制网站首页            
<asp:LinkButton Runat="server" ID="hideWeather">Hide</asp:LinkButton></div>
ASP.NET中定制网站首页    
</div>
ASP.NET中定制网站首页    
<div class="right">
ASP.NET中定制网站首页        
<div class="rightSubheadYellow" runat="server" id="hdTopStories">Top Stories</div>
ASP.NET中定制网站首页        
<div class="rightSubYellow" runat="server" id="TopStories">The Sky Is FallingASP.NET中定制网站首页<br>
ASP.NET中定制网站首页            Governer Alberts Re-Elected to 22nd termASP.NET中定制网站首页
<br>
ASP.NET中定制网站首页            Scientist Predict Next EarthquakeASP.NET中定制网站首页
<br>
ASP.NET中定制网站首页            
<asp:LinkButton Runat="server" ID="hideTopStories">Hide</asp:LinkButton></div>
ASP.NET中定制网站首页        
<div class="rightSubheadYellow" runat="server" id="hdWord">Word of the Day</div>
ASP.NET中定制网站首页        
<div class="rightSubYellow" runat="server" id="Word"><b>hero</b><br>
ASP.NET中定制网站首页            n. pl. he·roes
<br>
ASP.NET中定制网站首页            
<br>
ASP.NET中定制网站首页            1. In mythology and legend, a man, often of divine ancestry, who is endowed 
ASP.NET中定制网站首页            with great courage and strength, celebrated for his bold exploits, and favored 
ASP.NET中定制网站首页            by the gods.
<br>
ASP.NET中定制网站首页            2. A person noted for feats of courage or nobility of purpose, especially one 
ASP.NET中定制网站首页            who has risked or sacrificed his or her life: soldiers and nurses who were 
ASP.NET中定制网站首页            heroes in an unpopular war.
ASP.NET中定制网站首页            
<br>
ASP.NET中定制网站首页            
<asp:LinkButton Runat="server" ID="hideWord">Hide</asp:LinkButton>
ASP.NET中定制网站首页        
</div>
ASP.NET中定制网站首页    
</div>
ASP.NET中定制网站首页
</div>
ASP.NET中定制网站首页
ASP.NET中定制网站首页
 
       现在你的网页内容被整洁的包含在DIV标签里面,当用户点击 hide按钮的时候就可以隐藏相应的内容。
 
 

       在实际的情况下,你很可能有一个注册/登录系统,把用户的参数信息存储在数据库里面。你可以载入参数信息并在Page Load事件里面隐藏不需要显示的内容。显然你大概也想到要实现一个页面让用户能够使用checkbox来选择需要显示的内容。你也可以简单的使用javascript和每个内容模块中的链接来“最小化”该内容模块。这个代码与本页面左边的导航菜单上用的是相似的。

相关文章:

  • 2021-11-10
  • 2021-10-12
  • 2021-06-08
  • 2021-11-16
  • 2022-12-23
  • 2021-10-27
  • 2022-01-07
猜你喜欢
  • 2021-08-27
  • 2021-05-05
  • 2021-08-30
  • 2021-08-01
  • 2022-02-22
  • 2021-11-17
  • 2021-12-23
相关资源
相似解决方案