下面獻上我的代碼,為了以后更加熟練掌握和熟練運用css,在這里做上一個筆記。
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>圖片旋轉(zhuǎn)</title> <style type="text/css"> div{ width: 300px; height: 240px; margin:200px auto; animation: rolldiv 10s linear infinite; transform-style: preserve-3d; } @keyframes rolldiv{ from{ transform: rotateY(0deg); } to{ transform: rotateY(360deg); } } img{ width: 300px; height: 240px; opacity: 0.9; position: absolute; } img:nt