导航:首页 > 万维百科 > 网页设计点击左侧导航右侧跳转

网页设计点击左侧导航右侧跳转

发布时间:2020-08-31 16:10:02

1、求点击左侧导航,切换右侧内容代码!

代码?只能给个提示,实现方法有很多,你可以把右边设置几个div,除一个外全部隐藏,点击左边连接,相应右边div显示,其余再隐藏

2、HTML使用DIV+CSS如何实现左边导航,右边显示内容,点击那个导航显示那个内容

1、新建html文档。

2、书写hmtl代码。

<ul>

<li><A class="hover" href="#">前端交流</A></li>

<li><A href="#">交互设计</A></li>

<li><A href="#">视觉设计</A></li>

<li><A href="#">用户研究</A></li>

<li><A href="#">设计茶吧</A></li>

<li><A href="#">前端交流</A></li>

<li><A href="#">团队生活</A></li>

<div id="lanPos"></div>

</ul>

3、书写css代码。

<style>

html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary, time, mark, audio, video { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; font-weight: normal; }

body { line-height: 1; }

:focus { outline: 1; }

article, aside, canvas, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary { display: block; }

nav ul, ul, li { list-style: none; }

blockquote, q { quotes: none; }

blockquote:before, blockquote:after, q:before, q:after { content: ''; content: none; }

a { margin: 0; padding: 0; border: 0; font-size: 100%; vertical-align: baseline; background: transparent; text-decoration: none; }

a:hover { text-decoration: underline; }

ins { background-color: #ff9; color: #000; text-decoration: none; }

mark { background-color: #ff9; color: #000; font-style: italic; font-weight: bold; }

del { text-decoration: line-through; }

abbr[title], dfn[title] { border-bottom: 1px dotted #000; cursor: help; }

table { border-collapse: collapse; border-spacing: 0; }

hr { display: block; height: 1px; border: 0; border-top: 1px solid #cccccc; margin: 1em 0; padding: 0; }

input, select { vertical-align: middle; }

.fl { float: left; display: inline-block; }

.fr { float: right; display: inline-block; }

.clearfix:after { visibility: hidden; display: block; font-size: 0; content: " "; clear: both; height: 0; }

.clearfix { display: inline-table; }

* html .clearfix { height: 1%; }

.clearfix { display: block; }

html { font-size: 62.5%; /* 10÷16=62.5% */ }

body { font-size: 12px; font-size: 1.2rem; background: #F8F8F8; font-family: "宋体"; }

ul { width: 180px; margin: 0 auto; background: #fff; position: relative; z-index: 0; padding: 60px 20px 70px; }

ul li { height: 40px; line-height: 40px; text-align: center; border-bottom: 1px solid #F8F8F8; }

ul li a { color: #666; display: block; }

ul li a:hover { color: #FF5F3E; text-decoration: none; }

ul li a.hover { color: #FF5F3E; }

#lanPos { width: 225px; height: 40px; line-height: 40px; background: #F8F8F8; border-left: 5px solid #FF5F3E; position: absolute; left: -5px; top: 0; z-index: -1; transition: top .2s; }

</style>

4、书写并引用js代码。

<script src="js/jquery.min.js"></script>

<script>

$(function(){

$('#lanPos').css('top',$('.hover').offset().top);

$('ul li').hover(function(){

$('#lanPos').css('top',$(this).offset().top);

},function(){

$('#lanPos').css('top',$('.hover').offset().top);

})

$('ul li').click(function(){

for(var i=0;i<$('ul li').size();i++){

if(this==$('ul li').get(i)){

$('ul li').eq(i).children('a').addClass('hover');

}else{

$('ul li').eq(i).children('a').removeClass('hover');

}

}

})

})

</script>

5、代码整体结构。

6、查看效果

3、框架网页中如何实现左边导航栏一点击右边自动变换网页效果??

看你发了两次,我决定回答两次多赚点分~~嘿嘿!

你这个框架网页实际包含三个网页不是。在nain文件里frame标签下有有name="",记住引号里的东西。在left文件的链接标签上加上target="",引号里是你要右边框架的name。
如下:<a href="www.htm" target="mainFrame">

好像在main文件的frame标签下加上target="mainFrame" 也能实现这个效果,但是我昨天没试成功,令我很郁闷。网页有几种打开方式:1.在原来窗口中打开_self,2.在新窗口中打开_blank,3.在父窗口中打开_parent.自己试着玩吧,在dw中的设置是链接下的目标选择。

4、html框架 点击左侧导航时,相应的右侧页面跳出框架,打开一个新的页面

因为少个target属性,如果不写的话,默认是_blank,就是新开一个页面

试试在框架左侧点击的标签内加上target="右边框架的name"。

5、html怎么设计 左侧是菜单栏,点击不同的菜单选项在右侧出现相应的内容?

大致思路

左侧:菜单,给每个菜单设置id和onclick点击事件,onclick事件触发的函数假设写为display()

右侧:写个固定样式的div,id假设设置为board。


如果你的菜单内容在服务器

display()的实现如下

function display(){
    $.ajax({
    type: "POST",
    url: 菜单所请求的内容地址,
    data: this.id等等相关的请求标志,
    success: funtion(data){$('board').html(data)},//返回数据填充
    dataType: dataType});
}


如果菜单内容写死在页面内

那么右侧:写和菜单数一样多的div,把所有的display属性设置为none


同时display()的实现如下

function display(){
    $('#'+$(this).attr('rel')).style.display='block';
}


以上,伪代码,仅供参考

6、网站左侧导航,点击左侧导航,页面不跳转直接在右侧显示所链接的内容,如何实现呢。。。

使用模版,固定你的左侧导航。在右边插入可编辑项。思路大概就是这样,有帮助请采纳

7、怎么实现点击左边的导航右边显示对应的页面?

肯定是先布局了,如果右侧是在网上有的页面,在左侧直接绑定连接就可以了,如果右侧是自己设计的页面,那左侧直接绑定自己设计的页面就可以了。

<!DOCTYPE HTML>
<html>
    <head>
        <meta charset="gb2312" />
        <title></title>
        <style>
        </style>
    </head>
    <body>
        <a href="http://www.baidu.com" target="test">百度</a>
        <a href="http://www.qq.com" target="test">qq</a>
        <iframe src="" name="test"></iframe>
    </body>
</html>

8、如何实现网页点击左边的导航右边显示对应的页面

肯定是先布局了,如果右侧是在网上有的页面,在左侧直接绑定连接就可以了,如果右侧是自己设计的页面,那左侧直接绑定自己设计的页面就可以了。

<!DOCTYPE HTML>
<html>
    <head>
        <meta charset="gb2312" />
        <title></title>
        <style>
        </style>
    </head>
    <body>
        <a href="http://www.baidu.com" target="test">百度</a>
        <a href="http://www.qq.com" target="test">qq</a>
        <iframe src="" name="test"></iframe>
    </body>
</html>

9、asp.net mvc怎么让主页点击左侧导航条,右边的分区内容会变化能够跳转到别的页面,html代码写好了可以跳

mvc的页面本质上跟html的代码没啥区别,不会跳也许是因为mvc的路由机制,这和webform有本质的区别

10、java界面设计:单击左侧导航菜单,右侧面板切换如何实现?求代码

右侧用iframe,导航的超链接的target='右侧iframe的id'

与网页设计点击左侧导航右侧跳转相关的知识