第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

為什么在此 CSS 轉(zhuǎn)換過程中存在明顯的滯后?

為什么在此 CSS 轉(zhuǎn)換過程中存在明顯的滯后?

長(zhǎng)風(fēng)秋雁 2023-10-30 20:59:09
該 html 元素的轉(zhuǎn)換在第一次運(yùn)行時(shí)有明顯的滯后。當(dāng)您將鼠標(biāo)懸停在其上多次后,這種卡片翻轉(zhuǎn)機(jī)制會(huì)很順暢。有人可以解釋為什么以及如何解決它嗎?.container {  display: flex;  flex-wrap: wrap;  justify-content: center;}.k-card {  border-radius: 25px;  width: 250px;  margin: 2%;  border-color: white;  height: 330px;}.k-card-image {  text-align: center;  align-content: center;}.k-card-footer {  text-align: center;  border: none;  position: absolute;  bottom: 1px;  width: 100%;  background-color: inherit;  font-weight: bold;  color: white;  align-items: center;  border-radius: 25px;}/* The flip card container - set the width and height to whatever you want. We have added the border property to demonstrate that the flip itself goes out of the box on hover (remove perspective if you don't want the 3D effect */.flip-card {  border-radius: 25px;  width: 250px;  height: 330px;}/* This container is needed to position the front and back side */.flip-card-inner {  border-radius: 25px;  position: relative;  width: 100%;  height: 100%;  text-align: center;  transition: transform 0.5s;  transform-style: preserve-3d;}/* Do an horizontal flip when you move the mouse over the flip box container */.flip-card:hover .flip-card-inner {  transform: rotateY(180deg);}/* Position the front and back side */.flip-card-front,.flip-card-back {  position: absolute;  width: 100%;  height: 100%;  -webkit-backface-visibility: hidden;  /* Safari */  backface-visibility: hidden;  border-radius: 25px;}/* Style the front side */.flip-card-front {  background-color: #18988B;}.k-button.k-primary {  background-color: #18988B;  padding: 2px;  border-color: #18988B;}另外,jsfiddle 的鏈接:https://jsfiddle.net/McRobBlob/s9f07wgy/
查看完整描述

2 回答

?
眼眸繁星

TA貢獻(xiàn)1873條經(jīng)驗(yàn) 獲得超9個(gè)贊

問題在于財(cái)產(chǎn)transform-style: preserve-3d;。


將其從.flip-card-inner方塊中移除并將其移至.flip-card:hover .flip-card-inner方塊中。


.flip-card-inner {

  border-radius: 25px;

  position: relative;

  width: 100%;

  height: 100%;

  text-align: center;

  transition: transform 0.5s;

/*  transform-style: preserve-3d; remove */

}



/* Do an horizontal flip when you move the mouse over the flip box container */


.flip-card:hover .flip-card-inner {

  transform: rotateY(180deg);

  transform-style: preserve-3d; /* add */

}

更新


在 @TemaniAfif 評(píng)論之后我有更好的解決方案:


backface-visibility: hidden;只需從你的 CSS 中刪除即可。


.flip-card-front,

.flip-card-back {

/* -webkit-backface-visibility: hidden; remove */

/* backface-visibility: hidden;  remove */

}


查看完整回答
反對(duì) 回復(fù) 2023-10-30
?
函數(shù)式編程

TA貢獻(xiàn)1807條經(jīng)驗(yàn) 獲得超9個(gè)贊

我會(huì)嘗試添加will-change: transform;orwill-change: auto;.flip-card-inner.

參考: https://developer.mozilla.org/en-US/docs/Web/CSS/will-change


查看完整回答
反對(duì) 回復(fù) 2023-10-30
  • 2 回答
  • 0 關(guān)注
  • 122 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)