模拟手机拖动效果

代码语言:html

所属分类:拖放

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

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title> Flicking examples iphone</title>
    <style>

        body {
            background: #26A478;
        }
        .iphone {
            position: absolute;
            width: 200px;
            height: 400px;
            border-radius: 20px;
            background: #fff;
            box-shadow: rgba(100, 100, 100, 0.4) 5px 5px;
            left: 0;
            right: 0;
            top: 0;
            bottom: 0;
            margin: auto;
        }
        .iphone .container {
            position: absolute;
            width: calc(100% - 10px);
            height: calc(100% - 100px);
            background: transparent;
            border: 2px solid #ddd;
            border-radius: 5px;
            left: 0;
            right: 0;
            margin: auto;
            bottom: 52px;
            overflow: hidden;
        }
        .iphone .head {
            position: absolute;
            width: 36px;
            height: 8px;
            top: 22px;
            left: 0;
            right: 0;
            border-radius: 4px;
            margin: auto;
            background: #ddd;
        }
        .iphone .home {
            position: absolute;
            width: 36px;
            height: 36px;
            border: 2px solid #ccc;
            border-radius: 50%;
            bottom: 6px;
            left: 0;
            right: 0;
            margin: a.........完整代码请登录后点击上方下载按钮下载查看

网友评论0