如何在materialize css中更改轮播项的宽度

时间:2018-03-26 22:18:28

标签: css carousel materialize

我想改变旋转木马项目的宽度和高度。我设法改变高度,但无法改变宽度。

<div class="carousel z-depth-5">
<div class="carousel">
<a class="carousel-item" href="#one!"><img src="https://lorempixel.com/250/250/nature/1"></a>
<a class="carousel-item" href="#two!"><img src="https://lorempixel.com/250/250/nature/2"></a>
<a class="carousel-item" href="#three!"><img src="https://lorempixel.com/250/250/nature/3"></a>
<a class="carousel-item" href="#four!"><img src="https://lorempixel.com/250/250/nature/4"></a>
<a class="carousel-item" href="#five!"><img src="https://lorempixel.com/250/250/nature/5"></a>
 </div>
    </div>

css

.carousel-item img{
height: 400px;
width: 300px;
}

.carousel{
height: 700px;
}

1 个答案:

答案 0 :(得分:2)

宽度可能会被另一个css规则覆盖。 试试这个:

def stats_fun(x):
    return pd.Series({'data_mean': x['value'].mean(),
                      'data_std': x['value'].std(),
                      'data_n': x['value'].count(),
                      'anti_grp_mean': df[df['name'] != x.name]['value'].mean(), 
                      'anti_grp_std': df[df['name'] != x.name]['value'].std(),
                      'anti_grp_n': df[df['name'] != x.name]['value'].count()
                     })
df.groupby('name').apply(stats_fun)