我正在尝试使用 SASS 提供的 make-col() mixin。http://v4-alpha.getbootstrap.com/layout/grid/。我想要做的是创建两列。有了编译好的类,我就可以做
我得到两个 div,它们以任何大于sm.
在 Bootstrap Sass 中(我在 React 中使用它),当我这样做时:
.row {
@include make-row()
}
.left {
@include make-col(3)
}
.right {
@include make-col(9);
}
Run Code Online (Sandbox Code Playgroud)
它确实将两个浮动在一起,但是当我缩小屏幕时,两者不会被挡住。它们保持漂浮状态。使用 mixins 时,如何让 Bootstrap 镜像上述示例。
顺便说一句,从文档中:@mixin make-col($size, $columns: $grid-columns, $gutter: $grid-gutter-width)- 究竟是size什么?是列数吗?我很困惑,因为还有一个$columns变量。
我的问题类似于我已经尝试过解决方案的问题,但这对我的情况来说并不完全正确.
我有2张桌子:投票和帖子.这是一个基本草图:
`posts`
----+------------------------------------------------------------------------+
| ID | post_title |
+----+-----------------------------------------------------------------------+
| 1 | Hello world. |
| 2 | This is a post! |
| 3 | What is the meaning of life? |
| 4 | Looking for a good time? |
+----+-----------------------------------------------------------------------
`votes`
+----+---------+
| ID | post_id |
+----+---------+
| 1 | 1 |
| 2 | 1 |
| 3 | 1 |
| 4 | 3 |
| 5 | 3 |
| …Run Code Online (Sandbox Code Playgroud) 这是要返回的对象.
Object:
contributors_enabled: false
created_at: "Sat Apr 18 02:20:51 +0000 2009"
...
status: Object
...
verified: false
Run Code Online (Sandbox Code Playgroud)
如您所见,有2个对象.父级,然后是名为"status"的对象.
在javascript中,如何访问"status"对象.
我试过object.status返回null.
真实代码:
function get_data( $id ) {
global $tmhOAuth;
$code = $tmhOAuth->request( 'POST', $tmhOAuth->url('1/users/lookup.json', ''), array( 'user_id' => $id ) );
if ( $code == 200 ) {
$data = json_decode($tmhOAuth->response['response'], true);
return $data;
} else {
outputError($tmhOAuth);
}
}
if ( !empty( $_POST ) && !is_null( $_POST ) ) {
extract( $_POST ); //imports $id;
$data = get_data($id); …Run Code Online (Sandbox Code Playgroud)