html5 css3怎么用无序列表写一个3d立体正方体,目前还没学js,所以求怎么写,来个事例,参

html5 css3怎么用无序列表写一个3d立体正方体,目前还没学js,所以求怎么写,来个事例,参,第1张

加入正方形宽高为100px,

ul li:nth-child(1){

background-color: red

transform: translate(-100px) rotateY(90deg)

}

ul li:nth-child(2){

background-color: blue

transform: translate(100px) rotateY(90deg)

}

ul li:nth-child(3){

background-color: orange

transform: translateZ(100px)

}

ul li:nth-child(4){

background-color: green

transform: translateZ(-100px)

}

ul li:nth-child(5){

background-color: black

transform: translateY(100px) rotateX(90deg)

}

ul li:nth-child(6){

background-color: chocolate

transform: translateY(-100px) rotateX(90deg)

}

空间想象力要好,最开始所有面都重合在一起,要一个个移到指定位置形成个立方体

有好多方法。我这里用table的方法,你参考一下:

<head>

<meta http-equiv="Content-Type" content="text/htmlcharset=utf-8" />

<title>无标题文档</title>

</head>

<body>

<table width="200" height="200" border="0" bgcolor="#000000">

<tr>

<td> </td>

</tr>

</table>

</body>

</html>

1. 在页面上使用文本框元素,下面以单行文本框为例列举示例代码:

1<input type="text" />

2. 可以使用HTML的value设置文本框的默认显示文字即可,如下所示:

1<input type="text" value="默认文字" />

注意:如果input元素带有readonly、disabled属性用户也将无法编辑或输入文字,如果有以上属性需要删除后方可输入文字。


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zaji/7236418.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-03
下一篇 2023-04-03

发表评论

登录后才能评论

评论列表(0条)

保存