我正在尝试创建一个全屏旋转木马,但即使我放置“align: center”,我的所有图片都显示在屏幕的左上角
这是我的 html...
<div class="scroller">
<div> <%= image_tag("tokyo.jpg", options = {align: "center", height: "500px"}) %> </div>
<div><%= image_tag("dolphin.jpg", :style => "align: center;") %></div>
<div><%= image_tag("heart.jpg", :style => "height: 635px;") %></div>
</div>
我也试过从样式表中设计它的样式,但我不确定它为什么不起作用……这就是它的样子。同样出于某种原因,左边的箭头没有出现在任何图片上,而右边的箭头出现在所有图片上。
最佳答案
<div class="scroller">
<div> <%= image_tag("tokyo.jpg", options = {align: "center", height: "100%"}) %> </div>
<div><%= image_tag("dolphin.jpg", :style => "align: center;") %></div>
<div><%= image_tag("heart.jpg", :style => "height: 635px;") %></div>
</div>
关于jquery - 样式 image_tag 和光滑的轮播?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36558575/