上の2つのボタンを中心には...私は、このモックアップをやろうとしているのdivブートストラップ
...と私は、画像の上にこれらの2つのボタンを配置する必要がありポイントに来ました。私は1つのボタンを置くことができたが、2番目のボタンは機能していない。これは最初のボタンのコードです。
#img_container {
position:relative;
display:block;
text-align:center;
}
.button {
position:absolute;
bottom:50%;
right:50%;
width:200px;
height:50px;
margin:0px -100px -15px 0px;
background-color: rgb(246, 175, 228);
border: none;
box-shadow: 4.5px 7.794px 5px 0px rgba(0, 0, 0, 0.094);;
font-size: 1.3em;
color: white;
text-transform: uppercase;
}
<div id="img_container" class=" "text-center col-lg-12 col-md-12 col-sm-12 col-xs-12">
<img src="img/homepicture.jpg"/>
<button class="button">lazybop</button><br>
<button class="button1">see the products</button>
</div>
それから私は、同じコードを使用しようとしましたが、わずか40%とbottomプロパティの数を減らし、それはまだ同じ場所に残っています。
.button1 {
position:absolute;
bottom:40%;
right:50%;
width:200px;
height:50px;
background-color: rgb(246, 175, 228);
border: none;
box-shadow: 4.5px 7.794px 5px 0px rgba(0, 0, 0, 0.094);;
font-size: 1.3em;
color: white;
text-transform: uppercase;
}
をあなたは 'クラス=」「テキスト・センターCOL-LG-12 COL-MD-12 col-で追加の二重引用符を持っていますsm-12 col-xs-12 "' –