Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/73.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html Put<;部门>;另一个<;部门>;CSS_Html_Css - Fatal编程技术网

Html Put<;部门>;另一个<;部门>;CSS

Html Put<;部门>;另一个<;部门>;CSS,html,css,Html,Css,我想做的是把一个带有两个图像按钮的按钮放在另一个只用于背景色的按钮上 例如: 我怎样才能将带有两个按钮的div放在背面,就像附件中一样 到目前为止,我的代码是: CSS: HTML: 我的代码如下所示: 试试这个,可能会有帮助(未经测试): .checkoutButton { position:relative; top:-value; z-index: 10; } PS:将值更改为实际值,例如,如果按钮高度为136px,则将

我想做的是把一个带有两个图像按钮的按钮放在另一个只用于背景色的按钮上

例如:

我怎样才能将带有两个按钮的div放在背面,就像附件中一样

到目前为止,我的代码是:

CSS:

HTML:


我的代码如下所示:


试试这个,可能会有帮助(未经测试)

.checkoutButton
    {
        position:relative;
        top:-value;
        z-index: 10;
    }
PS:
值更改为实际值,例如,如果按钮高度为
136px
,则将其设置为
-3px
->((按钮高度divs高度)/2)


我希望它有帮助,但很抱歉没有测试它。我现在无法尝试此功能。它可能会有帮助(未经测试):

.checkoutButton
    {
        position:relative;
        top:-value;
        z-index: 10;
    }
PS:
值更改为实际值,例如,如果按钮高度为
136px
,则将其设置为
-3px
->((按钮高度divs高度)/2)


我希望它能帮上忙,但很抱歉没有测试它。我现在不能

您的图像被包装在
behind
div中,因此它们与您的背景在同一点开始。首先,将它们移出:

<div>
        <div class="behind"></div>
        <asp:ImageButton ID="btnCheckin" runat="server" ImageUrl="~/image/button1.png"
            CssClass="checkinButton" />
        <asp:ImageButton ID="btnCheckout" runat="server" ImageUrl="~/image/button2.png"
            CssClass="checkoutButton divider" />
</div>

,但我使用了其他图像,因此
顶部偏移量的值不同。

您的图像被包装在
后面的
div中,因此它们从背景的相同点开始。首先,将它们移出:

<div>
        <div class="behind"></div>
        <asp:ImageButton ID="btnCheckin" runat="server" ImageUrl="~/image/button1.png"
            CssClass="checkinButton" />
        <asp:ImageButton ID="btnCheckout" runat="server" ImageUrl="~/image/button2.png"
            CssClass="checkoutButton divider" />
</div>
,但我使用了其他图像,因此
顶部:
偏移量的值不同

.behind {
    background-color: #e2e0de;
    width: 100%;
    height: 130px;
    z-index: -1;
    position: absolute;
    top: 20px;
}