早上好晚上好
不久前,我编写了一些代码,采用轮播的第四个 .item
并赋予它一个新类。
Owl Carousel: How to change the size of the fourth item
现在,我尝试使用 CSS 使选定的 .item
大于其余部分并居中,但没有成功。
这是我正在使用的引用:
引用设计:
I've tried using `display: flex` and `flex-grow:1`<br>
and `position:relative` `position:absolute` too.
关于如何解决这个问题有什么想法吗? 谢谢:D
最佳答案
.your-item {
transform: scale(1.1);
transform-origin: 50% 50%;
}
应该可以解决您的问题。显然,您想将比例因子从 1.1
更改为对您的示例有意义的任何值。
如果您希望变换原点位于底部,请使用 transform-origin: 50% 100%;
关于javascript - 猫头鹰旋转木马 |如何使用 CSS 更改 .Item 的大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54514307/