纯css一个div布局实现一个iphone框架效果

代码语言:html

所属分类:布局界面

代码描述:纯css一个div布局实现一个iphone框架效果

代码标签: div 布局 实现 一个 iphone 框架 效果

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


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">

<style>
body,
html {
  margin: 0;
  padding: 0;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: #5684c0;
  font-family: sans-serif;
}

.title {
  color: #fff;
  text-align: center;
  font-weight: 300;
  letter-spacing: 1px;
  margin: 50px 0 70px;
}

.iphone {
  position: relative;
  box-sizing: border-box;
  height: 600px;
  width: 320px;
  margin: 20px auto;
  padding: 87px 30px;
  background-color: #fff;
  color: #fff;
  border-radius: 30px;
  letter-spacing: 1px;
  overflow: auto;
  text-align: center;
  font-family: sans-serif;
  font-size: 13px;
  text-transform: uppercase;
  box-shadow: 0px 0px 0px 10px rgba(0, 0, 0, 0.08);
  background-image: radial-gradient(circle, #fff 15px, transparent 18px), radial-gradient(circle, #e2e0e0 20px, transparent 20px), radial-gradient(circle, #e2e0e0 5px, transparent 5px), linear-gradient(to right, #efefef 30px, transparent 0), linear-gradient(to left, #efefef 30px, transparent 0), linear-gradient(to top, #efefef 70px, transparent 0), linear-gradient(to bottom, #efefef 70px, transparent 0), linear-gradient(to bottom, transparent 25%, #5684c0 25%);
  background-position: 0px 265px, 0px 265px, -50px -264px, 0px 0p.........完整代码请登录后点击上方下载按钮下载查看

网友评论0