从一个页面到另一个页面选项卡tap界面

这个问题好像简单,所以我在网上搜了之后自己摸索着写出来。为了防止更多的新手们为解决这个问题苦恼,特地分享出来。


页面A


<body>

    <a href="选项卡-练习.html?type=1">1111111111</a>

    <a href="选项卡-练习.html?type=2">2222222222</a>

    <a href="选项卡-练习.html?type=3">3333333333</a>

</body>

页面B


css

<style type="text/css">

    *{margin: 0;padding: 0;}

    #box{width: 300px;margin:100px auto;}

    input {width: 93px;height: 30px;}

    #box1{position: relative;}

    #box1 div{width: 300px;height: 200px;border: 1px solid red;position: absolute;top: 0;font-size: 20px;text-align: center;line-height: 200px;display: none;}

    #box1 .box1a{display: block;}

    .btn{background: #000;color: pink;}

</style>


html

<body>

    <div id="box">

        <input type="button" name="" value="11111" class="btn">

        <input type="button" name="" value="22222">

        <input type="button" name="" value="33333">

        <div id="box1">

            <div id="1" class="box1a">1111111111</div>

            <div id="2">222222222222</div>

            <div id="3">333

希望能被有需要的人看到

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。