0
私はブートストラップとウェブデザインで新しくなっています.iモバイル対応のスライダーを作成したいのですが、スライダーの中央にあるテキストをボックスの中に揃えたいと思っています。私は解決するために手伝ってください。私はどのように反応することができますか?ミドル/センタボックスをスライダのテキストで整列させるにはどうすればモバイルビューで反応するのですか?
i made align center in desktop view but in mobile view or responsive it won't happen.
Please Note: i am using bx slider here. (screenshot attached)
Here is my code:
<header>
<div class="slider">
<ul class="bxslider">
<li><img src="images/slider.jpg" class="slide-img img-responsive"/>
<div class="cap-box">
<p class="cap1">AIRFRESHENER</p>
<p class="cap2">OUR PRODUCT IS GOOD</p>
</div>
</li>
<li><img src="images/slider.jpg" class="slide-img img-responsive"/>
<div class="cap-box">
<p class="cap1">AIRFRESHENER</p>
<p class="cap2">OUR PRODUCT IS GOOD</p>
</div>
</li>
<li><img src="images/slider.jpg" class="slide-img img-responsive"/>
<div class="cap-box">
<p class="cap1">AIRFRESHENER</p>
<p class="cap2">OUR PRODUCT IS GOOD</p>
</div>
</li>
</ul>
</div>
CSS file:
.slide-img
{
width: 100%;
/*height: 700px;*/
}
.bx-wrapper .bx-viewport
{
-moz-box-shadow: none;
-webkit-box-shadow: none;
box-shadow: none;
}
.bx-viewport {
position: static!important; /* center to page correctly */
border: 0!important; /* border */
-webkit-box-shadow: none!important; /* these two shadows */
box-shadow: none!important;
}
.cap-box {
position: absolute;
margin-left:25%;
background: rgba(0,0,0,0.5);
top: 35%;
width:660px;
height: 180px;
display: block;
padding: 50px 0px;
}
.cap1
{
font-family: Roboto, Serif;
font-weight: 700;
font-size: 36px;
color: #ea6153;
text-indent: 65px;
}
.cap2
{
font-family: Roboto, serif;
font-weight: 700;
font-size: 48px;
text-align: center;
color: #ffffff;
line-height: 13px;
}
[![This Screenshot is my desktop view][1]][1]
[![This is my Mobile view which is not responsive with slider(Airfreshener our product is good)][2]][2]
[1]: https://i.stack.imgur.com/HpK0Y.jpg
[2]: https://i.stack.imgur.com/HR4CH.png
ammm正確に注意していただきたいのは、ネクサス6を選択すると応答性に優れています...しかし、iPhone 4sに入ってくると以前の問題と同じです。 @nzkks – mittal3795
実際にデスクトップで私はこのような見た目のスライダーが欲しいhttp://picpaste.com/3-pgUQnRQg.PNGとaccoridngこのCSSは、デスクトップでも同じことをすることはできませんii – mittal3795
あなたは特定の@メディアを追加することができるかもしれないあなたのターゲットオーディエンスの使用状況に基づいて人気のあるサイズやデバイスサイズのCSSスタイル。もしあなたがiPhone 4sのためのスタイリングについて非常に具体的なら、[this](https://coderwall.com/p/bgf8aa/media-queries-only-for-the-iphone-4-4s-part-ii)を見てください。それはあなたのためのいくつかのアイデアを与えるかもしれない。 – nzkks