首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
您找到你想要的搜索结果了吗?
是的
没有找到

CSS3模拟的iphone键盘

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>使用CSS3模拟的iphone键盘</title> <style type="text/css"> @font-face { font-family: 'iPhone keyboard'; src: url(http://cahty.googlecode.com/svn/trunk/css/iphone-keyboard.ttf); } body { margin:0; color:gray; font-family:Helvetica, Arial, sans-serif; } #iphone-keyboard { max-width:480px; margin:10px auto; padding:0; overflow:hidden; border-top:1px solid #3A3D42; background:#757D8A; background-image:-moz-linear-gradient(#9098A3, #454f5d); background-image:-webkit-gradient(linear, left top, left bottom, from(#9098A3), to(#454f5d)); box-shadow:0 1px 0 rgba(255,255,255,.3) inset; -moz-box-shadow:0 1px 0 rgba(255,255,255,.3) inset; -webkit-box-shadow:0 1px 0 rgba(255,255,255,.3) inset; } #iphone-keyboard li { text-align:center; margin:.5em .1em .25em; list-style:none; } #iphone-keyboard li:first-child { margin-top:.3em; } #iphone-keyboard button, #iphone-keyboard button.specialkey:active { color:#3A3D42; text-decoration:none; text-align:center; text-shadow:0 1px 1px white; font-weight:bold; border:0; border-top:1px solid rgba(255,255,255,.45); background:#ECEDEF; background-image:-moz-linear-gradient(#f8f8f9, #dddfe1); background-image:-webkit-gradient(linear, left top, left bottom, from(#f8f8f9), to(#dddfe1)); border-radius:4px; -moz-border-radius:4px; -webkit-border-radius:4px; box-shadow:0 1px 3px rgba(0,0,0,.7), 0 1px 0 rgba(0,0,0,.3); -moz-box-shadow:0 1px 3px rgba(0,0,0,.7), 0 1px 0 rgba(0,0,0,.3); -webkit-box-shadow:0 1px 3px rgba(0,0,0,.7), 0 1px 0 rgba(0,0,0,.3); } #iphone-keyboard button { display:inline-block; width:8.6%; margin:0 .25%; padding:.02em 0 .03em; color:black; font-size:1.35em; font-family:Helvetica, Arial, sans-serif; } #iphone-keyboard button:active, #iphone-keyboard button.space:active { background-image:-moz-linear-gradient(#E2E3E4,

02

CSS | 视差滚动 | 笔记

image-20230720145639107css3中的坐标系,rotateX就是绕着x轴旋转,rotateY就是绕着Y轴旋转,rotateZ就是绕着z轴旋转(也就是xy平面的旋转)。 perspective属性用来设置视点,在css3的模型中,视点是在Z轴所在方向上的。 translateX,translateY表现出在屏幕中的上下左右移动,transformZ 的直观表现形式就是大小变化, 实质是 XY平面相对于视点的远近变化(说远近就一定会说到离什么参照物远或近,在这里参照物就是perspective属性)。 比如设置了 perspective 为 200px; 那么 transformZ 的值越接近 200,就是离的越近,看上去也就越大,超过200就看不到了, 因为相当于跑到后脑勺去了,你不可能看到自己的后脑勺。 (200-transformZ的值)就是视点和xy平面的距离(初始是屏幕的位置,此时transformZ的值为0)。

02
领券