add a sign up link to our home page_Ruby_编程开发_程序员俱乐部

中国优秀的程序员网站程序员频道CXYCLUB技术地图
热搜:
更多>>
 
您所在的位置: 程序员俱乐部 > 编程开发 > Ruby > add a sign up link to our home page

add a sign up link to our home page

 2011/9/5 8:10:30  peryt  http://peryt.iteye.com  我要评论(0)
  • 摘要:continuewiththepriorarticle,I'lltrytoaddasignuplinktoourhomepage.<%=link_to"Signupnow!",'#',:class=>"signup_buttonround"%>Remember,#meansablanklink,alinktoitself.thegeneratedhtmlwillbe:<ahref="#"class="signup_buttonround">Signupnow
  • 标签:

continue with the prior article, I'll try to add a sign up link to our home page.

?

?

<%= link_to "Sign up now!", '#', :class => "signup_button round" %>

Remember, # means a blank link, a link to itself.

?

?the generated html will be:

?

<a href="#" class="signup_button round">Sign up now!</a>

?

note:

?

right now, the <a> tag has two classed, seperated by a space.

?

<a href="#" class="signup_button round">

?this is convenient for the common case of an element with two kinds of styles.

?

?

Ok, we are done with adding a sign up button.

  • 相关文章
发表评论
用户名: 匿名