⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 14 - adding dhtml effects with script.aculo.us.rb

📁 O Reilly Ruby Cookbook source code
💻 RB
字号:
<!-- app/views/layouts/application.rhtml --><html>  <head>    <title>My Web App</title>    aardvark*<%= javascript_include_tag "prototype", "effects" %>*aardvark  </head>  <body>    <%= @content_for_layout %>  </body></html>#---<p id="important">Here is some important text, it will be highlightedwhen the page loads.</p><script type="text/javascript"><%= visual_effect(:highlight, "important", :duration => 1.5) %></script>#---<p id="deleted">Here is some old text, it will fade away when the pageloads.</p><script type="text/javascript"><%= visual_effect(:fade, "deleted", :duration => 1.0) %></script>#---<img id="to-squish" src="bug.jpg"><%=link_to_function("Squish the bug!", visual_effect(:squish, "to-squish"))%>#---<script type="text/javascript"><%= visual_effect(:fade, 'deleted-text', :duration => 1.0) %></script>#---<script type="text/javascript">new Effect.Fade("deleted-text", {duration:1.0});</script>#---

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -