あなたはposition: relative
を使用してiMacの画面と所定の位置に合わせて画像の静的な幅と高さを設定することができます。
html, body{
height: 100%; /* Body and html need to have 100% height in order to show whole background image */
}
.mac-slider {
background-image: url('http://www.cincinnatiskinandlaser.com/wp-content/plugins/wp-graphic/templates/video/imac/images/testi_bg.png');
background-position: top center;
background-repeat: no-repeat;
height: 100%; /* This also needs to have 100% height in order to show whole background image */
}
.mac-slider-item img {
margin: 27px auto;
opacity: 0.3;
}
.slick-current img {
opacity: 1 !important;
position: relative; /* Position of current image centered in iMac screen */
left: 2px;
top: -9px;
}
.slick-slide img{
width: 467px; /* Static dimensions of picture to fit into iMac screen */
height: 263px;
}
「iMacの中で」スライダーには特別なものがあると本当に思いますか?それはあなたが持っているどのような種類のコンピュータハードウェアではなく、どのブラウザを使用するかがますます重要になります。 –
@low_rents私はiMacの写真の中にあることを意味します)) – pwnz22