小编skl*_*boy的帖子

如何防止 Bootstrap 列从一个部分跳到另一部分或在彼此下面?

我正在为我的项目制作推荐部分。有 4 个 div,但它们的内容不均匀,因此当我开始将屏幕的宽度拉到一起时,col-sm-6它们应该像 2-2 一样排列,但 3 号 div 跳到了div no.4,后面留一个空位,然后div no.4 跳到下面一行。我怎样才能防止他们搞砸呢?我尝试过添加max-width,但这也不起作用......

\n\n

\r\n
\r\n
.testimonial-content {\r\n  text-align: center;\r\n  margin: 15px auto 15px auto;\r\n}\r\n.testimonial-content h5 {\r\n  margin-top: 20px;\r\n}\r\n.testim-logo-container {\r\n  height: 100px;\r\n  width: 100%;\r\n  display: flex;\r\n  justify-content: center;\r\n  align-items: center;\r\n}\r\n.testimonial-logo {\r\n  max-width: 100px;\r\n}
Run Code Online (Sandbox Code Playgroud)\r\n
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">\r\n\r\n<div class="row">\r\n  <div class="testimonial-content">\r\n    <div class="col-lg-3 col-sm-6 col-xs-12">\r\n      <div class="testim-logo-container">\r\n        <img class="img-responsive testimonial-logo" src="http://placehold.it/200x50/999/000/?text=1" alt="testimonial logo">\r\n      </div>\r\n      <p>"It\'s amazing to see the progress of the students, that Laszlo …
Run Code Online (Sandbox Code Playgroud)

html css twitter-bootstrap

5
推荐指数
1
解决办法
5704
查看次数

Laravel5 ajax 删除不起作用

我正在做一个项目,我应该使用ajax从表中删除用户。我一直在寻找多种解决方案,但无论如何都行不通。这是我得到的错误: users

加载资源失败:服务器响应状态为 500(内部服务器错误)

VerifyCsrfToken.php 第 46 行中的 TokenMismatchException

JS:

$('.btn-delete').click(function(){
    var id = $(this).val();
    $.ajax({
        type: 'DELETE',
        url: '/laravel-exercise/public/index/'+id,
        success: function (data) {
            console.log('Success:', data);
        },
        error: function (data) {
            console.log('Error:', data);
        }
    });
});
Run Code Online (Sandbox Code Playgroud)

看法:

$('.btn-delete').click(function(){
    var id = $(this).val();
    $.ajax({
        type: 'DELETE',
        url: '/laravel-exercise/public/index/'+id,
        success: function (data) {
            console.log('Success:', data);
        },
        error: function (data) {
            console.log('Error:', data);
        }
    });
});
Run Code Online (Sandbox Code Playgroud)

路线:

<button class="btn btn-danger btn-delete"
 value="{{$user->id}}" data-token="{{ csrf_token() }}">Delete</button>
Run Code Online (Sandbox Code Playgroud)

用户控制器:

Route::delete('index/{$id}', 'UsersController@destroy');
Run Code Online (Sandbox Code Playgroud)

这里出了什么问题?

javascript php ajax jquery laravel-5

2
推荐指数
1
解决办法
690
查看次数

标签 统计

ajax ×1

css ×1

html ×1

javascript ×1

jquery ×1

laravel-5 ×1

php ×1

twitter-bootstrap ×1