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

為了賬號安全,請及時綁定郵箱和手機立即綁定

怎么可以讓正方體沿著中心旋轉(zhuǎn)?

怎么可以讓正方體沿著中心旋轉(zhuǎn)?

正在回答

3 回答

<html?lang="en">

<head>

????<meta?charset="UTF-8">

????<meta?name="viewport"?content="width=device-width,?initial-scale=1.0">

????<title>正方體</title>

</head>

<body>

????<div?class='out-box'>

????????<div?class="inner-box">

????????????<span?class="front?common">前</span>

????????????<span?class="left?common">左</span>

????????????<span?class="right?common">右</span>

????????????<span?class="behind?common">后</span>

????????????<span?class="top?common">上</span>

????????????<span?class="bottom?common">下</span>

????????</div>

????</div>

????<style>

????????body,html{

????????????width:?100%;

????????????height:?100%;

????????????padding:?0;

????????????margin:?0;

????????????background-color:?antiquewhite;

????????}

????????.out-box?{

????????????width:?100%;

????????????height:?100%;

????????????display:?flex;

????????????justify-content:?center;

????????????align-items:?center;

????????????perspective:?5000px;

????????????backface-visibility:?hidden;

????????}

????????.inner-box?{

????????????width:?300px;

????????????height:?300px;

????????????position:?relative;

????????????transform-style:?preserve-3d;

????????????transform:?translatez(-150px)?rotateX(30deg)?rotateY(30deg)?;

????????}

????????.front?{

????????????background-color:?salmon;

????????????transform:translatez(150px);

????????}

????????.behind?{

????????????transform:translatez(-150px);

????????????background-color:?aqua;

????????}

????????.right?{

????????????background-color:?chartreuse;

????????????transform:rotateY(90deg)?translatez(150px)?;

????????}

????????.left?{

????????????background-color:?pink;

????????????transform:rotateY(-90deg)?translatez(150px)?;

????????}

????????.top?{

????????????background-color:?darkcyan;

????????????transform:?rotateX(90deg)?translateZ(150px);

????????}

????????.bottom?{

????????????background-color:?coral;

????????????transform:?rotateX(90deg)?translateZ(-150px);

????????}


????????.inner-box:hover??{

???????????

????????????transform:?translatez(-150px)?rotateX(135deg)?rotateY(45deg)?;

????????????transition:?all?3s;

????????}

????????.common?{

????????????position:?absolute;

????????????left:?0;

????????????right:?0;

????????????top:?0;

????????????bottom:?0;

????????????margin:?auto;

????????????display:?block;

????????????text-align:?center;

????????????font-size:?35px;

????????????font-weight:?bold;

????????????color:?#fff;

????????????width:?300px;

????????????height:?300px;

????????????line-height:?300px;

???????????

????????}

????</style>

</body>

</html>


0 回復(fù) 有任何疑惑可以回復(fù)我~

加一個關(guān)鍵幀動畫

@-webkit-keyframes s{
??? 0%{
??????? -webkit-transform:rotateY(0);
??? }
??? 100%{
??????? -webkit-transform:rotateY(-359.9deg);
??? }
}

0 回復(fù) 有任何疑惑可以回復(fù)我~

http://www.w3school.com.cn/cssref/pr_transform-origin.asp

查看這個文檔就可以了,調(diào)整你的transform-origin 在 x y z 三個軸上的位置為 50%

0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

學(xué)習(xí)之王 提問者

不是這樣的,是正方體,不是正方形
2018-01-09 回復(fù) 有任何疑惑可以回復(fù)我~

舉報

0/150
提交
取消

怎么可以讓正方體沿著中心旋轉(zhuǎn)?

我要回答 關(guān)注問題
微信客服

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

幫助反饋 APP下載

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

公眾號

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