“`
CSS 代码:
.ball .eight { width: 110px; height: 110px; margin: 30%; background: white; border-radius: 50%; -webkit-transform: translateX(68px) translateY(-60px) skewX(15deg) skewY(2deg); position: absolute; } .ball .eight:before { content: "8"; display: block; position: absolute; text-align: center; height: 80px; width: 100px; left: 50px; margin-left: -40px; top: 44px; margin-top: -40px; color: black; font-family: Arial; font-size: 90px; line-height: 104px; }
眼球效果
上面的效果怎么样?相信你已经很惊讶了。不过,CSS 能坐的远不止这些,这里我们再来实现一个眼球效果。
HTML 代码如下:
“`