-
图标的样式(bootstrap的icon)
-
背景颜色
-
出现的位置
-
Alert Basics
<%= simple_alert "Message" %>
-
Alert with title
<%= simple_alert "Message", :title => "Title" %>
-
Alert with icon
<%= simple_alert "Message", :icon => :music %>
-
Alert有5种类型,分别为:default, success, info, warning和danger,你能通过设置type来定义类型
You can use it like this: <%= simple_alert "Be carefully", :icon => :question_sign, :type => :danger %>
-
图标的样式与bootstrap的icon样式一样
另外simple_alert有4个显示位置,分别为左上角,左下角,右上角和右下角,你能通过设置point来定义位置
You can use it like this:
-
左上角:
<%= simple_alert "左上角", :title => "Demo", :icon => :tags, :point => [:left, :top] %>
-
左下角:
<%= simple_alert "左下角", :title => "Demo", :icon => :tags, :point => [:left, :bottom] %>
-
右上角:
<%= simple_alert "左上角", :title => "Demo", :icon => :tags, :point => [:left, :top] %>
-
右下角:
<%= simple_alert "左下角", :title => "Demo", :icon => :tags, :point => [:left, :bottom] %>
系统默认是右上角