css布局实现紫色iphone 12效果代码

代码语言:html

所属分类:布局界面

代码描述:css布局实现紫色iphone 12效果代码

代码标签: 紫色 iphone 12 效果

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开


<!DOCTYPE html>
<html lang="en" >

<head>

  <meta charset="UTF-8">

  
  
<style>
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    position: relative;
    height: 100vh;
    background: rgb(238, 228, 255);
}

.edge {
    position: absolute;
    top: 400px;
    left: 312px;
    height: 43px;
    width: 660px;
    background: linear-gradient(to right, rgb(78, 68, 133)1%, rgb(190, 187, 233)3%,rgb(109, 98, 156)8%, rgb(175, 167, 219)20%,rgb(109, 98, 156)92%,rgb(196, 193, 240)97.5%,rgb(94, 90, 131)100%);
    border-radius: 0 0 20px 20px;
   box-shadow: inset 0px 1px 2px 3px rgb(103, 90, 128);
    z-index: -1;
}
.edge::before /*vertical stripes*/{
content: "";;
position: absolute;
left: 60px;
height: 40px;
width: 8px;
background: linear-gradient(to bottom, rgb(146, 133, 206)20%, rgb(168, 155, 216)60%, rgb(137, 116, 194));
}
.edge::after /*vertical stripes*/{
    content: "";;
    position: absolute;
    right: 60px;
    height: 40px;
    width: 8px;
    background: linear-gradient(to bottom, rgb(146, 133, 206)20%, rgb(168, 155, 216)60%, rgb(137, 116, 194));
    }

    .volume-up {
        position: absolute;
        top: 19px;
        left: 160px;
        height: 13px;
        width: 50px;
        background: transparent;
        border-radius: 50px;
        box-shadow: 0px -0.7px 1px 1px rgb(85, 76, 112), inset 0px 0.8px 1px 1px rgb(190, 187, 233);
    }
    .volume-up::before /*silent*/ {
        content: "";
        position: absolute;
        top: 4px;
        left: -60px;
        height: 8px;
        width: 30px;
        background: transparent;
        border-radius: 50px;
        box-shadow: 0px -0.7px 0px 1px rgb(62, 53, 83), inset 0px -1px 3px 2px rgb(88, 72, 110);
    }

    .volume-up::after /*silent*/ {
        content: "";
        position: absolute;
        top: 1px;
        left: -60px;
        height: 5px;
        width: 30px;
        background: rgb(161, 151, 202);
        border-bottom: 1px solid rgb(100, 82, 124);
        border-top: 1.7px solid rgb(75, 56, 105);
        border-radius: 50px;
        box-shadow: inset 0px 0.9px 1px 0.5px rgb(189, 159, 231.........完整代码请登录后点击上方下载按钮下载查看

网友评论0