私は現在、背景と境界線のあるh4を持っています。
左側のマークされた境界線と上下の境界線は、青い背景画像が配置されている領域に配置する必要があります。
最終的には、次のようになります。
私の考えは、境界線が背景と同じ要素に属しているため、を介して境界線の上に背景を配置することでしたがz-index:
、これは機能しません。
私の現在のコードは次のようになります。
.workstations .textbox h4 {
display: inline-block;
color: #3391cc;
font-size: 1em; font-weight: normal;
line-height: 100%;
background: url(images/workstations_bg.png) no-repeat;
border: 1px solid #dedede;
padding: 14px 0 9px 25px;
}
.workstations .textbox h4 span {
display: inline-block;
color: #e86228;
font-size: 0.9rem;
}
とにかくそれをする?私は次のようなことをしてみました
.workstations .textbox h4 background-image {
z-index: 100;}
.workstations .textbox h4 border { z-index: 50;}
これは機能しません...
何か助けはありますか?