有一段时间没写代码了,刚写有点手生,无从下手,为了能快速进入状态,就写了这一个小东西,纯用标签和样式表写。下面看一下我写的。

这一段是样式表:

  <style>
*{
margin: 0;
padding: 0;
}
ul,li{
list-style: none;
}
ul{
position: relative;
top: 200px;
left: 200px;
width: 200px;
height: 200px;
transform-style: preserve-3d;
transition: all 5s;
       transform:rotateX(-45deg) rotateY(-45deg);
}
ul:hover{
transform: rotateX(360deg) rotateY(360deg);
}
li{
position: absolute;
width: 200px;
height: 200px;
border-radius: 20px;
background-color: #222;
}
li:nth-child(1){
transform: translateZ(100px);
background-color: red;
}
li:nth-child(2){
background-color: green;
transform: translateZ(-100px);
}
li:nth-child(3){
background-color: silver;
transform: rotateY(90deg) translateZ(-100px);
}
li:nth-child(4){
background-color: pink;
transform: rotateY(90deg) translateZ(100px);
}
li:nth-child(5){
background-color: brown;
transform: rotateX(90deg) translateZ(-100px);
}
li:nth-child(6){
background-color: yellow;
transform: rotateX(90deg) translateZ(100px);
}
</style>

这一段是HTML:

  <ul>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>

对于这种毫无技术含量的,实在没脸。看一下效果:

鼠标放在上面就会旋转,感兴趣的可以试一下,觉得low的多提意见,脸皮厚。

用html标签+css写出旋转的正方体的更多相关文章

  1. css写出0.5px边框(一)

    在移动端会出现线条太粗的现象,简单来说,是因为手机端的像素单位和ui的图比例是2:1,所以ui图的1px边框对我们来说就是0.5px,但是浏览器渲染的最小单位就是1px,下面给几种方法用css写出0. ...

  2. css写出三角形(兼容IE)

    css写出三角形   利用css写三角形,兼容IE7 .arrow-up { width:0px; height:0px; border-left:10px solid transparent; bo ...

  3. 纯HTML+CSS写出一颗会飘动的树,有没有惊艳到你呢?

    前言 使用HTML+CSS能写出什么惊人的效果呢? 针对这个问题,我总会看到类似的回答,比如没有JS,前端永远都是静态的:HTML5要搭配JS,要不然一文不值. JS固然强大,但CSS也并非一文不值, ...

  4. html+css写出类似word目录样式的内容

    word目录的格式里这种很常见,要用html+css写出来刚开始还有点懵. 左右两边都是内容撑开宽度,中间内容的宽度也不是确定的,也是随着左右两边的内容动态变化的. 最终解决思路是,给右边内容加上白色 ...

  5. 不用任何图片,只用简单的css写出唯美的钟表,就问你行吗?

    aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAGHCAIAAABJR31QAAAgAElEQVR4nOy9aXhc1ZUurPvcH7f73n ...

  6. 用纯css写出三角形

    1.新建一个元素,随便什么元素,不过我习惯性的会用块元素来做.如果行内元素就display:block它.<div class="triangle"></div& ...

  7. 何使用CSS写出一个下拉菜单。

    导航菜单是每个网站所必备的功能,也是每个学习制作网站的朋友所必须接触的,如何用css样式制作一个简单漂亮的二级下拉菜单呢? 下面为大家分享一下我的经验 方法步骤: 第一步  : 首页我们打开Subli ...

  8. 用css写出下拉框(代码转自wq群)

    做网易云音乐首页时遇到的问题,鼠标指在右上角头像时出现下拉框. <style>/* css*/ #body{ float: left; } #xialakuang{ background- ...

  9. html+css写出响应式侧边导航栏

    html部分:先写用div画好六个导航的卡片,再利用css添加响应效果 <div class='card-holder'> <div class='card-wrapper'> ...

随机推荐

  1. 让centos使用ubuntu的make命令补全功能

    一直习惯使用debian.ubuntu做开发机,最近it要求各种安全加固,且只提供centos自动化脚本,而ubuntu版本比较乱,14.16.17都要自己整一遍太麻烦,索性换装centos7. 换了 ...

  2. Dev控件

    在DevExpress程序中使用PopupContainerEdit和PopupContainer实现数据展示 使用PopupContainerEdit和PopupContainerControl制作 ...

  3. numpy知识点总结

    一.数组方法 创建数组:arange()创建一维数组:array()创建一维或多维数组,其参数是类似于数组的对象,如列表等 反过来转换则可以使用numpy.ndarray.tolist()函数,如a. ...

  4. C# 创建日志

    public void Log(string message) { try { string logFileName = "c:\\log\\LogName" + DateTime ...

  5. archetypeCatalog=internal

    Properties中添加  archetypeCatalog=internal,不加这个参数,在maven生成骨架的时候将会非常慢.

  6. boost system

    boost::system::error_code is the most basic class in Boost.System; it represents operating system-sp ...

  7. Angular JS - 9 - SeaJS加载js模块

    seajs加载模块的三种方式 1.seajs.use() 加载入口模块,类似于Java的main函数 2.require:      当在一个模块中需要用到其它模块时一般用require加载 1)   ...

  8. delphi 加入超链接

    delphi 加入超链接//在uses中加入ShellAPI//通过该lpFile参数可以实现链接到主页或ftp站点 ShellExecute(handle,nil,pchar('http://www ...

  9. 7 November in 614

    每日总结不能少!让自己的头脑好好清醒清醒,才不会犯那些所谓的低级错误! Contest A. ssoj3045 A 先生砍香蕉树 根据数据范围 \(m\le 1000,b\le 10000\),显然本 ...

  10. ValueError: invalid literal for int() with base 10问题处理

    问题描述: 在用pthon写脚本得过程中,发生错误,ValueError: invalid literal for int() with base 10,这种错误是值得类型转换错误,int()函数是可 ...