简体   繁体   English

在 Bootstrap 列中对齐跨度

[英]Align span in Bootstrap columns

So I'm trying to align the Swipe Icon to the right without padding-right: 0;所以我试图在没有padding-right: 0;情况下将滑动图标向右对齐padding-right: 0; doesn't work:(不起作用:(

Herse some Code and Images: Herse 一些代码和图像: 在此处输入图片说明

Here's my HTML:这是我的 HTML:

<div class="col-sm-4">
    <span class="c-visualslider__swipeicon"></span>
</div>

and my SCSS:和我的 SCSS:

.c-visualslider {
    padding: 528px 0 80px;
    position: relative;
    background: map-get($colors, black);

    &__swipeicon {
        height: 34px;
        margin-top: 8px;
        width: 32px;
        display: inline-block;
        background-repeat: no-repeat;
        background-image: (image);

add three css properties to swipeicon向 swipeicon 添加三个 css 属性

display: flex; 
justify-content: flex-end; 
margin: 8px 0 0 auto;

try this尝试这个

.c-visualslider {
    padding: 528px 0 80px;
    position: relative;
    background: map-get($colors, black);

    &__swipeicon {
        height: 34px;
        width: 32px;
        background-repeat: no-repeat;
        background-image: (image);

        display: flex;
        justify-content: flex-end;
        margin: 8px 0 0 auto;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM