div {
width: 100%;
width: -webkit-calc(100% - 50px);
width: -moz-calc(100% - 50px);
width: calc(100% - 50px);
}
pre {
white-space: pre-wrap; /* CSS 3 */
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
}
.boxsizingBorder {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
#box {
height: 90px;
line-height: 90px;
}
background-size: 50% 50%;
不过不是所有浏览器都支持的。
Drupal 7的managed_file类型有个bug,不支持prefix和suffix属性,可以通过增加一个container绕过:
$array['rows'][] = array(
'file_managed_container' => array(
'#prefix' => '<td>',
'#suffix' => '</td>',
'file_managed_element' => array(
'#type' => 'managed_file',
...
),
),
);
An example of view block with related nodes based on 'tags'.
1. Create a block (take a look at screenshots below)
2. Add a relationship: Taxonomy term: Content using: Tags
3. Add contextual filter: (field_tags) Content: Nid
When the filter value is NOT available
Provide default value -> Content ID from URL
MORE
check: Exclude
this contextual filter will remove current node from the view
4. Add contextual filter: Taxonomy term: Term ID
div { height:100vh; }
说明:vh是viewport height,单位是%,如果前面不是100而是1,就表示窗口高度的1%。据说所有浏览器都支持。
background: #6cab26;
background-image: url(IMAGE_URL); /* fallback */
background-image: url(IMAGE_URL), -webkit-gradient(linear, left top, left bottom, from(#6cab26), to(#6ceb86)); /* Saf4+, Chrome */
background-image: url(IMAGE_URL), -webkit-linear-gradient(top, #6cab26, #6ceb86); /* Chrome 10+, Saf5.1+ */
background-image: url(IMAGE_URL), -moz-linear-gradient(top, #6cab26, #6ceb86); /* FF3.6+ */
background-image: url(IMAGE_URL), -ms-linear-gradient(top, #6cab26, #6ceb86); /* IE10 */
用CSS实现:
textarea.fooClass { resize: none; }
热门内容
最新内容
- 1 week 2 days ago
- 1 week 5 days ago
- 3 weeks ago
- 3 weeks ago
- 3 weeks 2 days ago
- 4 weeks ago
- 4 weeks ago
- 4 weeks ago
- 1 month 1 week ago
- 1 month 1 week ago
最新评论