布局技巧-CSS三角强化的巧妙运用【梯形价格栏】

.box1 {
            width: 0;
            height: 0;
            /* 把上边框宽度调大 */
            /* border-top: 100px solid transparent;
            border-right: 50px solid skyblue; */
            /* 左边和下边的边框宽度设置为0 */
            /* border-bottom: 0 solid blue;
            border-left: 0 solid green; */
           /* 1.只保留右边的边框有颜色 */
           border-color: transparent red transparent transparent;
            /* 2. 样式都是solid */
            border-style: solid;
            /* 3. 上边框宽度要大, 右边框 宽度稍小, 其余的边框该为 0 */
            border-width: 100px 50px 0 0 ;

        }

猜你喜欢

转载自blog.csdn.net/weixin_43837268/article/details/109002693