关于生成布局问题

 我做了一个移动端的导航,然后用的是html5的历史管理,去做来回切换
 切换的内容是一个iframe,大家觉得这样的方式好不好!!
 还是用一个链接跳转到相应页面好?
        <div id="wrapper">
            //这里是切换的
            <div class="news" data-hash="news" style="display: none;">
                <iframe src="news.html" width="100%" height="100%"></iframe>
            </div>
            <div class="read" data-hash="read" style="display: none;">
                <iframe src="read.html" width="100%" height="100%"></iframe>
            </div>
            <div class="video" data-hash="video" style="display: block;">
                <iframe src="video.html" width="100%" height="100%"></iframe>
            </div>
            <div class="find" data-hash="find" style="display: none;">
                <iframe src="find.html" width="100%" height="100%"></iframe>
            </div>
            <div class="me" data-hash="me" style="display: none;">
                <iframe src="me.html" width="100%" height="100%"></iframe>
            </div>
            //这里是导航栏目
            <footer class="oFooter" style="height: 45px;">
                <nav data-hash="news" index="0" style="position: relative;">新闻</nav>
                <nav data-hash="read" index="1" style="position: relative;">阅读</nav>
                <nav data-hash="video" index="2" style="position: relative; color: red;">视听</nav>
                <nav data-hash="find" index="3" style="position: relative;">发现</nav>
                <nav data-hash="me" index="4" style="position: relative;">我</nav>
            </footer>
        </div>
阅读 2.6k
1 个回答

如果没必要用iframe最好不用,你这个需求不用iframe和跳转,直接用div写在里面应该也是可以的

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题