我一直没能找到一个重复的,你可以找到一堆的博客文章,其建议使用box-shadow的元素的焦点状态,而不是outline因为它是在造型方面更灵活,它也遵循border-radius你不像造型元素outline,其始终保持矩形。
是它认为一个很好的做法,以取代outline用box-shadow?是否有这样做的警告?
我正在使用bootstrap 3.3.2并遇到了令人困惑的情况.想要的效果如下图所示
图片http://imageshack.com/a/img537/8048/MAcoOV.png
我目前的HTML看起来像这样
<div class='container'>
<div style='padding-bottom: 30px;' class='row'>
<div class='col-md-3 col-sm-3 col-xs-6'><img style='max-width: 100%;'src="http://placehold.it/400x400"></div>
<div class='col-md-3 col-sm-3 col-xs-6'><img style='max-width: 100%;'src="http://placehold.it/400x400"></div>
<div class='col-md-6 col-sm-6 col-xs-12'><img style='max-width: 100%;'src="http://placehold.it/840x400"></div>
</div>
<div style='padding-bottom: 30px;' class='row'>
<div class='col-md-3 col-sm-3 col-xs-6'><img style='max-width: 100%;'src="http://placehold.it/400x400"></div>
<div class='col-md-6 col-sm-6 col-xs-12'><img style='max-width: 100%;'src="http://placehold.it/840x400"></div>
<div class='col-md-3 col-sm-3 col-xs-6'><img style='max-width: 100%;'src="http://placehold.it/400x400"></div>
</div>
<div style='padding-bottom: 30px;' class='row'>
<div class='col-md-6 col-sm-6'><img style='max-width: 100%;'src="http://placehold.it/840x400"></div>
<div class='col-md-3 col-sm-3'><img style='max-width: 100%;'src="http://placehold.it/400x400"></div>
<div class='col-md-3 col-sm-3'><img style='max-width: 100%;'src="http://placehold.it/400x400"></div>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
我现在对桌面屏幕上的样子感到满意.但是,当屏幕尺寸小于770px或打破网col-xs-*格时,我还需要将其看作下图.
图片http://imageshack.com/a/img911/4395/WIt2nk.gif
然而,在小屏幕上,第一行根据需要分成两行:第一行两个方形图像; …
我看着像有点类似问题,这还是这个,但他们看赋值操作他们回答不同的问题.例如,我的代码是
!item.completed ? addTask(item) : null
因为我想在满足条件时执行某个功能,或者如果不满足则不执行任何操作.我的问题是,作为一个"空"的第二个表达式被传递的好习惯是什么?
我看到很多人使用null,另一方面我认为使用空字符串''也是一个有效的选项,因为没有分配发生空字符串更快输入,似乎没有任何缺点.
javascript conditional ternary-operator conditional-statements