小编and*_*cl1的帖子

在Bootstrap 4 Alpha 6中的卡中心对齐'列表组项'?

有谁知道如何在Bootstrap 4 Alpha 6更新中对齐'list-group-item'?我可以在卡片本身添加文本中心,这会集中对齐卡片头和链接,但列表组不会移动.

我已经尝试了mx-auto类,这会集中移动文本,但边框缩小到只适合文本,所以看起来不合适

卡文本中心问题的示例.

这是我一直在测试的代码:

<div class="card" style="width: 20rem;">
  <img class="card-img-top" src="..." alt="Card image cap">
  <div class="card-block">
    <h4 class="card-title">Card title</h4>
    <p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
  </div>
  <ul class="list-group list-group-flush">
    <li class="list-group-item">Cras justo odio</li>
    <li class="list-group-item">Dapibus ac facilisis in</li>
    <li class="list-group-item">Vestibulum at eros</li>
  </ul>
  <div class="card-block">
    <a href="#" class="card-link">Card link</a>
    <a href="#" class="card-link">Another link</a>
  </div>
</div>
Run Code Online (Sandbox Code Playgroud)

twitter-bootstrap twitter-bootstrap-4 bootstrap-4

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

Swift IF语句问题 - 一元运算符错误

代码下面的swift有错误,我假设我不能在'if'语句中使用比较运算符...?

我收到错误

如果我尝试使用&&或||,则"一元运算符不能与其操作数分离" 在第一个'else'声明之后.

func pickerView(pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int)
    {
        if (row < 8)
        {
            self.pickerLabel.text = "Too cold";

        }
        else if(row >= 8 && <= 10) // Error occurs here...
        {
            self.pickerLabel.text = "Just right";
        }
        else if(row == 12)
        {
            self.pickerLabel.text = "Too warm";
        }
        else
        {
            view.backgroundColor = UIColor.blueColor();
        }
    }
Run Code Online (Sandbox Code Playgroud)

是否有解决方案可以让我解决任何人都知道的错误?

谢谢.

xcode ios swift

-2
推荐指数
2
解决办法
1256
查看次数