从我一直在阅读的内容来看,Sass是一种通过变量和数学支持使CSS更强大的语言.
与SCSS有什么区别?它应该是同一种语言吗?类似?不同?
我成功安装了Sass,但是我无法导入Compass.
以下是错误详细信息:
*Syntax error: File to import not found or unreadable: compass.
Load path: H:/HTML/___keoFull/sass
.....
Backtrace:
mainKeo.scss:2
style.scss:2
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/tree/import_node.rb:67:in `rescue in import'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/tree/import_node.rb:45:in `import'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/tree/import_node.rb:28:in `imported_file'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/tree/import_node.rb:37:in `css_import?'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/tree/visitors/perform.rb:217:in `visit_import'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/tree/visitors/base.rb:37:in `visit'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/tree/visitors/perform.rb:100:in `visit'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/tree/visitors/perform.rb:227:in `block in visit_import'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/tree/visitors/perform.rb:227:in `map'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/tree/visitors/perform.rb:227:in `visit_import'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/tree/visitors/base.rb:37:in `visit'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/tree/visitors/perform.rb:100:in `visit'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/tree/visitors/base.rb:53:in `block in visit_children'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/tree/visitors/base.rb:53:in `map'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/tree/visitors/base.rb:53:in `visit_children'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/tree/visitors/perform.rb:109:in `block in visit_children'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/tree/visitors/perform.rb:121:in `with_environment'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/tree/visitors/perform.rb:108:in `visit_children'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/tree/visitors/base.rb:37:in `block in visit'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/tree/visitors/perform.rb:128:in `visit_root'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/tree/visitors/base.rb:37:in `visit'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/tree/visitors/perform.rb:100:in `visit'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/tree/visitors/perform.rb:7:in `visit'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/tree/root_node.rb:20:in `render'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/engine.rb:315:in `_render'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/engine.rb:262:in …Run Code Online (Sandbox Code Playgroud) Safari和Chrome以及Opera和Firefox可以处理:hover伪类和邻近兄弟选择器:
a:hover + div {}
这有效.
但是,当添加另一个相邻兄弟时:
div:hover + a + div {}
Webkit崩溃了.
但是,如果你第一次将鼠标悬停在<a>与随后的悬停<div>样式应用,因为它应该.
我更加困惑,因为如果你添加:
div:hover ~ div {}
无论是否声明了样式,它都会按照应有的方式开始工作.
我看到这个问题:
对于OS X.
有任何想法吗?
高度以英寸为单位存储在数据库中.
但是,英尺和英寸需要以下列形式输入:
Height: [_______] feet [_______] inches
Run Code Online (Sandbox Code Playgroud)
所以我使用了虚拟属性,并使其正常工作.这是我的模型的简化版本:
class Client < ActiveRecord::Base
attr_accessible :name, :height_feet, :height_inches
before_save :combine_height
def height_feet
height.floor/12 if height
end
def height_feet=(feet)
@feet = feet
end
def height_inches
if height && height%12 != 0
height%12
end
end
def height_inches=(inches) #on save?
@inches = inches
end
def combine_height
self.height = @feet.to_d*12 + @inches.to_d #if @feet.present?
end
end
Run Code Online (Sandbox Code Playgroud)
而_form部分使用simple_form:
<%= simple_form_for(@client) do |f| %>
<ul>
<%= f.error_notification %>
<%= f.input :name %>
<%= f.input :weight %> …Run Code Online (Sandbox Code Playgroud) 我在heroku上有一个小节点应用程序.它嵌入在Chrome自助服务终端应用中.
我希望只有在以Kiosk模式安装它的Chromebook上才能访问该应用.
我已经尝试过HTTP身份验证,但在我输入密码和用户名后,应用程序从未加载.然而,这首先也不理想,因为我希望避免在Chromebook上使用密码.
有任何想法吗?
我想把一个元素的"网格"居中 - 当调整大小时 - 调整到中心本身.
像这样:
___________________
| |
| [] [] [] [] |
| [] [] [] [] |
| [] [] [] |
-------------------
________________
| |
| [] [] [] |
| [] [] [] |
| [] [] [] |
| [] [] |
----------------
_____________
| |
| [] [] |
| [] [] |
| [] [] |
| [] [] |
| [] [] |
| [] |
-------------
Run Code Online (Sandbox Code Playgroud)
我已经尝试设置了一个max-width,但是在调整大小时会导致这个问题: …
可以链接到附加#t=1m49s语法的YouTube视频中的特定时间.
是否可以在嵌入的同一页面上设置链接,使视频在视频中跳转到不同的时间?
<a href="">Link to 1 minutes 10 seconds</a>
<a href="">Link to 3 minutes 4 seconds</a>
<a href="">Link to 5 minutes 10 seconds</a>
etc..
Run Code Online (Sandbox Code Playgroud) 我希望有一个像+stacktextshadow(blue, red, green)吐出来的混合物text-shadow: 1px 1px 0 blue, 2px 2px 0 red, 3px 3px 0 green;
目前这就是我所拥有的:
=stacktextshadow($shadows...)
@for $i from 1 through length($shadows)
$shadow1: append(1px 1px 0, nth($shadows,1))
$shadow2: append(2px 2px 0, nth($shadows,2))
$shadow3: append(3px 3px 0, nth($shadows,3))
text-shadow: $shadow1, $shadow2, $shadow3
h1
+stacktextshadow(blue, red, green)
Run Code Online (Sandbox Code Playgroud)
这给了我:
h1 {
text-shadow: 1px 1px 0 blue, 2px 2px 0 red, 3px 3px 0 green;
text-shadow: 1px 1px 0 blue, 2px 2px 0 red, 3px 3px 0 green;
text-shadow: 1px …Run Code Online (Sandbox Code Playgroud) 这很难解释,所以这里有一个笔,可以看到所有的例子.
<table>
<thead>
<tr>
<th>Thing 1</th>
<th>Thing 2</th>
<th colspan=2>Thing 3</th>
<th>Thing 4</th>
<th colspan=2>Thing 5</th>
<th>Thing 6</th>
<th>Thing 7</th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan=2>40</td>
<td rowspan=2>30</td>
<th>Right</th>
<th>Left</th>
<td rowspan=2>50</td>
<th>Right</th>
<th>Left</th>
<td rowspan=2>25</td>
<td rowspan=2>30</td>
</tr>
<tr>
<td>10</td>
<td>20</td>
<td>15</td>
<td>40</td>
</tr>
</tbody>
</table>
Run Code Online (Sandbox Code Playgroud)
<table>
<thead>
<tr>
<th>Thing 1</th>
<th>Thing 2</th>
<th colspan=2>Thing 3</th>
<th>Thing 4</th>
<th colspan=2>Thing 5</th>
<th>Thing 6</th>
<th>Thing 7</th>
</tr>
<tr>
<th colspan=2></th>
<th>Right</th>
<th>Left</th>
<th></th>
<th>Right</th>
<th>Left</th> …Run Code Online (Sandbox Code Playgroud) 我正在尝试制作一个 mixin,它可以让我根据您使用的变量名称创建适应的代码块。
$foo: #00A9EC;
@mixin menu-color($color) {
.color-#{$color} a.level2,
.color-#{$color} a.level2:visited {
color: $color;
&:hover {
color: adjust-lightness($color, 10); }
&:active {
color: adjust-lightness($color, -10); } } }
@include menu-color($foo);
Run Code Online (Sandbox Code Playgroud)
输出:
.color-foo a.level2,
.color-foo a.level2:visited {
color: #00A9EC; }
.color-foo a.level2:hover,
.color-foo a.level2:visited:hover {
color: #20C0FF; }
.color-foo a.level2:active,
.color-foo a.level2:visited:active {
color: #0084B9; }
Run Code Online (Sandbox Code Playgroud) sass ×4
css ×3
html ×2
javascript ×2
compass-sass ×1
css3 ×1
embed ×1
haml ×1
safari ×1
simple-form ×1
webkit ×1
youtube ×1
youtube-api ×1