纯css布局实现一个iphone效果
代码语言:html
所属分类:布局界面
代码描述:纯css布局实现一个iphone效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> .iphoneContainer{ position: absolute; padding-left: 220px; width: 570px; height: 280px; overflow: hidden; } .Iphone{ position: relative; margin-top: 59px; height: 290px; width: 230px; transform:rotate(12deg); border-radius: 29px; box-shadow: inset 2px 2px 2px 4px #E7C6AC; margin-left: 120px; background: #FCDAC0; border-top: 3px solid #A37D61; border-left: 3px solid #A37D61; } .IphoneTop{ position: relative; top: -277px; left: 172px; height: 200px; width: 240px; transform:rotate(10deg); box-shadow: inset -6px 6px 4px 3px #E7C6AC; border-radius: 20px; background: #FEDCC1; border-right: 3.2px solid #A37D61; border-top: 1px solid #F1CFB3; } .smallborder{ border-top: 0.3px solid #A37D61; width: 95%; margin-top: -3px; transform: rotate(2deg); } .cameraContainer{ position: relative; width: 105px; height: 115px; background: linear-gradient(45deg, #C09D81 50%, #FFE5D0 100%); top: -490px; left: 150px; transform: rotate(12deg); border-radius: 25px; border:3.5px solid #DDB89C; box-shadow: 1px 1px 1px 1px #E7C6AC; } .camera{ position: relative; background-color: #231A11; border-radius: 50%; width: 40px; height: 40px; border: 3px solid #5C4029; box-shadow: 1px 1px 1px 1px #A6886F; } .torch{ position:relative; background: #F7EAD8; border-radius: 50%; height: 15px; width: 15px; left: 60px; top: -42px; border: 1px solid #FFE5D0; box-shadow: 2px 2px 2px 3px #FFE5D0; } .pos2{ top: -3px; border: 3px solid #5C4029; box-shadow: 1px 1px 1px 1px #A6886F; } .pos3{ left: 53px; top: -78px; border: 3px solid #EAC9AC; box-shadow: 1px 1px 1px 1px #A6886F; } .thatdotsha{ position: relative; background: #B69E8A; border-radius: 50%; height: 8px; width: 8px; top.........完整代码请登录后点击上方下载按钮下载查看
网友评论0