[英]How to zoom in to the center of a div
我想在我的大div上創建一個放大效果。 我搜索過很多問題,但仍然不知道這是怎么回事。
我希望能夠放大用戶屏幕的中心而不是設置位置。
我已經嘗試過css3 zoom
功能和animate
zoom
屬性,但仍然無法拉動這個。 任何人都可以幫我嗎? 非常感謝!
你應該縮放 div:
.scaled {
-moz-transform: scale(3);
-webkit-transform: scale(3);
-ms-transform: scale(3);
transform: scale(3);
}
div {
transition: all 500ms ease-in;
}
只需將CSS類應用於div,然后使用transitionEnd
事件通過.animate()
應用更多樣式。
在transitionEnd
(discard live()
,使用on()
): jsfiddle
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.