首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >我怎么排4分钱?

我怎么排4分钱?
EN

Stack Overflow用户
提问于 2015-10-05 11:41:34
回答 1查看 169关注 0票数 0

我要这些div是内嵌的。我试图将它们封装在div中,并使用display:内联块;将它们放到水平行中,但无法使其工作。我真的只是想把我的头放在定位和展示上。任何帮助都很感激。

html

代码语言:javascript
运行
复制
<div class="small_box_right">

    </div>
    <div class="small_box_right">

    </div>
    <div class="small_box_right">

    </div>
    <div class="small_box_right">

    </div>

css

代码语言:javascript
运行
复制
.small_box_right {
position: relative;
display:flex;
background: #CDCDB4;
border: 4px solid black;
height:300px;
width:300px;
}
.small_box_right:after, .small_box_right:before {
left: 100%;
top: 50%;
border: solid black;
content: " ";
height: ;
width: ;
position: absolute;
pointer-events: none;
}
.small_box_right:after {
border-color: rgba(136, 183, 213, 0);
border-left-color: #CDCDB4;;
border-width: 30px;
margin-top: -30px;
}
.small_box_right:before {
border-color: rgba(194, 225, 245, 0);
border-left-color:black ;
border-width: 36px;
margin-top: -36px;
}
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-10-05 12:13:23

这是一个演示

html:

代码语言:javascript
运行
复制
<div class="box-cover">
<div class="small_box_right">

</div>
<div class="small_box_right">

</div>
<div class="small_box_right">

</div>
<div class="small_box_right">

</div>

</div>

css:

代码语言:javascript
运行
复制
  .box-cover{
        position: relative;
        height: 300px;
        overflow: auto;
        width: 1550px;
    }

    .small_box_right {
        position: relative;
        display:inline-block;
        background: #CDCDB4;
        border: 4px solid black;
        height:300px;
        width:300px;
        margin-right: 50px;
    }
    .small_box_right:after, .small_box_right:before {
        left: 100%;
        top: 50%;
        border: solid black;
        content: " ";
        height: ;
        width: ;
        position: absolute;
        pointer-events: none;
    }
    .small_box_right:after {
        border-color: rgba(136, 183, 213, 0);
        border-left-color: #CDCDB4;;
        border-width: 30px;
        margin-top: -30px;
    }
    .small_box_right:before {
        border-color: rgba(194, 225, 245, 0);
        border-left-color:black ;
        border-width: 36px;
        margin-top: -36px;
    }
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/32947768

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档