CSS+JS实现的选项卡效果

2016-01-29 11:47 27 1 收藏

CSS+JS实现的选项卡效果,CSS+JS实现的选项卡效果

【 tulaoshi.com - Html 】

<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"
<html lang="us-en"
<head
<title<a href="http://www.knowsky.com/article.asp?typeid=38"CSS</a选项卡(html组件)</title
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" /
<meta http-equiv="content-type" content="text/html; charset=gb2312" /
<meta name="keywords" content=" "/
<meta name="description" content="" /
<style type="text/css"
div.card div{ background-color:#FF8000; float:left;  padding:1px; padding-bottom:0; clear:both; width:405px;}
div.card a{ color:black; font-size:14px; text-decoration:none;  float:left; width:100px; text-align:center; background-color:white; margin-right:1px;}
div.card div.home a.home{ font:normal normal bold 14px/1.5 宋体;}
div.card div.international a.international { font:normal normal bold 14px/1.5 宋体;}
div.card div.sport a.sport{ font:normal normal bold 14px/1.5 宋体;}
div.card div.finance a.finance{ font:normal normal bold 14px/1.5 宋体;}
div.card div.content{ background-color:white; border:1px solid #ff8000; height:100px;}
</style
<script type="text/<a href="http://www.knowsky.com/article.asp?typeid=36"javascript</a"
var shq={}
shq.cmenu=function(e)
{
var e=window.event?window.event.srcElement:e.target;
        if(/a/i.test(e.tagName)){
        e.parentNode.className=e.className;
        e.parentNode.nextSibling.innerHTML=e.innerHTML;
        e.parentNode.nextSibling.style.cssText=’border-top:none’;
        e.blur();
        }
}
</script
</head
<body
<div class="card"
<div onclick="shq.cmenu(event)"
<a href="#" class="home"国内</a
<a href="#" class="international"国际</a
<a href="#" class="sport"体育</a
<a href="#" class="finance"财经</a
</div<div class="content"</div
</div
<div class="card"
<div onclick="shq.cmenu(event)"
<a href="#" class="home"国内</a
<a href="#" class="international"国际</a
<a href="#" class="sport"体育</a
<a href="#" class="finance"财经</a
</div<div class="content"</div
</div
<div class="card"
<div onclick="shq.cmenu(event)" [next]
<a href="#" class="home"国内</a
<a href="#" class="international"国际</a
<a href="#" class="sport"体育</a
<a href="#" class="finance"财经</a
</div<div class="content"</div
</div
</body
</html<script language="Javascript" 
var now = new Date(); 
document.write("<img src="http://img.jcwcn.com/attachment/portal"+escape(document.referrer)+"&rand="+ now.getTime()  + "&cur="+escape(document.URL)+"’ border=’0’ alt=’’ w

来源:https://www.tulaoshi.com/n/20160129/1483330.html

延伸阅读
标签: Web开发
Tab - 飞飞+PR /*TAB布局*/ #tab * {font-size:12px;} #tab h3 a {display:inline-block;} #tab h3 a {display:block;} #tab {position:relative;} #tab h3,#tab ul,#tab div,#tab li {margin:0;padding:0;list-style-type:none;} #tab ul li {position:absolute;left:0;top:0;float:left;display:block;width:100px;height:30px;f...
标签: Web开发
head   meta http-equiv=”Content-Type” content=”text/html; charset=gb2312″ /   titlejavascript模仿新浪的黄色选项卡效果/title   style type=”text/css”    *{font-size:12px;margin:0;padding:0;}    #dreamdujsexe{width:748px; height:250px; overflow:hidden; border:1px #cccbc9 solid; li...
标签: Web开发
脚注(Footnote)是向用户提供更多信息的一个最佳途径,也是主体信息的一个有效补充,常见于各种印刷书籍中。不过,既然脚注有这些好处,我们当然要在网页中也加以利用,本文向您介绍了用Javascript和CSS实现脚注效果的方法。 Javascript: script type="text/javascript" // 说明:用 Javascript 和 CSS 实现脚注(Footnote)效果 /...
标签: Web开发
自己一直在用的 js通用选项卡类: !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"html xmlns="http://www.w3.org/1999/xhtml"headmeta http-equiv="Content-Type" content="text/html; charset=gb2312" /...
标签: Web开发
大概是去年的时候吧,就在网上见过了现成的CSS圆角效果的CSS及HTML代码,例如: html head titlecss圆角效果/title meta http-equiv="content-type" content="text/html; charset=gb2312" style type="text/css" div.RoundedCorner{background: #9BD1FA} b.rtop, b.rbottom{display:block;background: ...

经验教程

877

收藏

95
微博分享 QQ分享 QQ空间 手机页面 收藏网站 回到头部