如何在更少的情况下实现响应式卡列

时间:2016-08-13 03:10:07

标签: sass less twitter-bootstrap-4

引导程序文档使得在SASS中使卡片列响应:

<Window>
    <Grid x:Name="LayoutRoot">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="5*" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        <Border Grid.Column="0" Background="AliceBlue" />

        <!-- Main Panel -->
        <Grid Grid.Column="1" 
              Background="LightPink">

            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>

            <!-- Row 0: some User Control -->
            <Grid Grid.Row="0" MinHeight="100" />

            <!-- Row 1: some label -->
            <Label Grid.Row="1" Content="Example text" />

            <!-- Row 2: another User Control -->
            <StackPanel Grid.Row="2">

                <ScrollViewer VerticalScrollBarVisibility="Auto">
                    <ItemsControl>
                        <ItemsControl.Items>
                            <ContentPresenter Content="Item 1" />
                            <ContentPresenter Content="Item 2" />
                            <ContentPresenter Content="Item 3" />
                            <ContentPresenter Content="Item 4" />
                            <ContentPresenter Content="Item 5" />
                            <ContentPresenter Content="Item 6" />
                        </ItemsControl.Items>
                    </ItemsControl>
                </ScrollViewer>

                <Button Content="Open" />
            </StackPanel>

        </Grid>
        <Border Grid.Column="2" Background="AliceBlue" />

    </Grid>
</Window>

但是,我的网站上有一个LESS版本的bootstrap 4。

如何编写上面的语法较少?

0 个答案:

没有答案