如何禁用bootstrap 4卡上的边框

时间:2018-06-07 13:57:55

标签: css twitter-bootstrap

灰色轮廓一直出现在我的引导卡的img部分,我想删除它。  Bootstrap card

    export function getDoorstepsSongs () {
      return async dispatch => {
        const page1 = 'https://itunes.apple.com/search?country=us&media=music&limit=50&attribute=songTerm&term=door&sort=ratingIndex'
        const page2 = 'https://itunes.apple.com/search?country=us&media=music&limit=50&offset=50&attribute=songTerm&term=door&sort=ratingIndex'
    
        const jsonResponses = await Promise.all([
          fetchJsonP(page1),
          fetchJsonP(page2),
        ]).then(responses => {
          return Promise.all(responses.map(res => res.json()))
        }).catch(console.error)
    
        console.time('processing songs')
    
        //
        // jsonResponses contains the results of two API requests=
        //
        // 1. combine the results of these requests
        // 2. sort the results with lib/sortSongs.js
        //
    
        const sortedSongs = sortSongs(combinedResults)
    
        console.timeEnd('processing songs')
    
        return dispatch({
          type: 'GET_DOORSTEPS_SONGS_SUCCESS',
          songs: sortedSongs,
        })
      }
    }

4 个答案:

答案 0 :(得分:17)

border utilities可以帮助您解决此问题。从链接:

  

减法

<span class="border-0"></span>
<span class="border-top-0"></span>
<span class="border-right-0"></span>
<span class="border-bottom-0"></span>
<span class="border-left-0"></span>

对于您的情况,由于要删除所有边框,因此可以将border-0 CSS类添加到card中,如下所示:

<div class="card mb-4 border-0">
</div>

答案 1 :(得分:15)

如果您检查AT+QIACT=1 OK AT+QMTOPEN=1,"demo.thingsboard.io",1883 OK AT+QMTCONN=1,"demo.thingsboard.io","MY_ACCESS_TOKEN","" OK AT+QMTPUB=1,0,0,0,"v1/devices/me/telemetry" >{"temperature":35.00,"humidity":80.00} // MY_POST_DATA This line hanging my module 班级有.card

要将其删除,只需将其覆盖为border: 1px solid #e5e5e5;

即可

答案 2 :(得分:9)

简单地说,您可以将边界设为<div class="card border-0">

答案 3 :(得分:1)

最好使用bootstrap变量。您可以使用这些变量来自定义默认的卡片样式,并且不会覆盖Bootstrap CSS。您可以在此处查看如何执行此操作。 Bootstrap theming

// Cards

$card-spacer-y:                     .75rem !default;
$card-spacer-x:                     1.25rem !default;
$card-border-width:                 $border-width !default;
$card-border-radius:                $border-radius !default;
$card-border-color:                 rgba($black, .125) !default;
$card-inner-border-radius:          subtract($card-border-radius, $card-border-width) !default;
$card-cap-bg:                       rgba($black, .03) !default;
$card-cap-color:                    null !default;
$card-height:                       null !default;
$card-color:                        null !default;
$card-bg:                           $white !default;
$card-img-overlay-padding:          1.25rem !default;
$card-group-margin:                 $grid-gutter-width / 2 !default;
$card-deck-margin:                  $card-group-margin !default;
$card-columns-count:                3 !default;
$card-columns-gap:                  1.25rem !default;
$card-columns-margin:               $card-spacer-y !default;