内容大体是从网上找过来的,感觉那位哥们说的对,css还是比较靠谱的,当然有些高玩搞出来的东西本地

没有运行起来。

把自己的应用贴出来同大家分享

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<title>Div with fillet set and Tab change</title>
<style type="text/css">
/* div with fillet setting style*/
b.rtop, b.rbottom{
display:block;
background: white; /* set this color as same as bgcolor*/
}
b.rtop b, b.rbottom b{
display:block;
height: 1px;
overflow: hidden; /* the soul to solve this problem*/
background:#6DA6D9
} b.rbottom b.r1{
margin: 0 5px
}
b.rbottom b.r2{
margin: 0 3px
}
b.rbottom b.r3{
margin: 0 2px
}
b.rbottom b.r4{
margin: 0 1px;
height: 2px
} b.rtop b.r1{
margin: 0 5 0 0px
}
b.rtop b.r2{
margin: 0 3 0 0px
}
b.rtop b.r3{
margin: 0 2 0 0px
}
b.rtop b.r4{
margin: 0 1 0 0px;
height: 2px
} </style>
<script type="text/javascript">
// tab change
function setTab(name,cursel,n){
for(i=1;i<=n;i++){
var con=document.getElementById("con_"+name+"_"+i);
con.style.display=i==cursel?"block":"none";
} // back ground color
var bgcolor;
if(cursel==1){
bgcolor="#6DA6D9";
} else if(cursel==2){
bgcolor="#FF7D93";
} else if(cursel==3){
bgcolor="#8FC26C";
} else if(cursel==4){
bgcolor="#D2A000";
}
document.getElementById("contentscroll").style.background=bgcolor;
document.getElementById("r1top").style.background=bgcolor;
document.getElementById("r2top").style.background=bgcolor;
document.getElementById("r3top").style.background=bgcolor;
document.getElementById("r4top").style.background=bgcolor;
document.getElementById("r1buttom").style.background=bgcolor;
document.getElementById("r2buttom").style.background=bgcolor;
document.getElementById("r3buttom").style.background=bgcolor;
document.getElementById("r4buttom").style.background=bgcolor; // fillet set
if(cursel!=1){
document.getElementById("r1top").style.margin="0 5px";
document.getElementById("r2top").style.margin="0 3px";
document.getElementById("r3top").style.margin="0 2px";
document.getElementById("r4top").style.margin="0 1px";
} else {
document.getElementById("r1top").style.margin="0 5 0 0px";
document.getElementById("r2top").style.margin="0 3 0 0px";
document.getElementById("r3top").style.margin="0 2 0 0px";
document.getElementById("r4top").style.margin="0 1 0 0px";
} } </script>
</head> <body>
<div class="Menubox">
<span id="tab1" style="background: #6DA6D9; cursor: pointer;" onclick="setTab('tab',1,4)" >tab1</span>
<span id="tab2" style="background: #FF7D93; cursor: pointer;" onclick="setTab('tab',2,4)" >tab2</span>
<span id="tab3" style="background: #8FC26C; cursor: pointer;" onclick="setTab('tab',3,4)" >tab3</span>
<span id="tab4" style="background: #D2A000; cursor: pointer;" onclick="setTab('tab',4,4)" >tab4</span>
</div>
<div id="ContentBox" style="width: 800px;" >
<b class="rtop">
<b id="r1top" class="r1"></b>
<b id="r2top" class="r2"></b>
<b id="r3top" class="r3"></b>
<b id="r4top" class="r4"></b>
</b>
<div id="contentscroll" style="overflow-y: auto; height: 400px; width: 800px; border-color: white; background-color: #6DA6D9;">
<!-- tab block 1 -->
<div id="con_tab_1" style="margin: 0 20px; border-style: solid; border-color: #33339A; border-width: 0px;background-color: #6DA6D9;">
<h3>tab block 1</h3>
</div>
<!-- tab block 2 -->
<div id="con_tab_2" style="margin: 0 20px; border-style: solid; border-color: #33339A; border-width: 0px; background-color: #FF7D93; display:none;">
<h3>tab block 2</h3>
</div>
<!-- tab block 3 -->
<div id="con_tab_3" style="margin: 0 20px; border-style: solid; border-color: #33339A; border-width: 0px; background-color: #8FC26C; display:none;">
<h3>tab block 3</h3>
</div>
<!-- tab block 4 -->
<div id="con_tab_4" style="margin: 0 20px; border-style: solid; border-color: #33339A; border-width: 0px; background-color: #D2A000; display:none;">
<h3>tab block 4</h3>
</div>
</div>
<b class="rbottom">
<b id="r4buttom" class="r4"></b>
<b id="r3buttom" class="r3"></b>
<b id="r2buttom" class="r2"></b>
<b id="r1buttom" class="r1"></b>
</b>
</div>
</body>
</html>

DIV的圆角表现和TAB切换的更多相关文章

  1. DIV+CSS 样式简单布局Tab 切换

    <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> &l ...

  2. tab切换的效果——仿照今日头条APP的切换效果

    说点废话;不知道是哪一版本起头条的tab切换效果就变了,一直琢磨着这个事,去度娘那里也没有什么结果:正好这两天有空就尝试做了一下:用前端的技术来实现: 先看效果吧:上面的tab随着slide滑动,上面 ...

  3. CSS3 :target伪类实现Tab切换效果

    用:target伪类实现Tab切换效果真的非常简单!简单到什么程度呢?它只需要下面这些代码. style.css: .song-info { position: absolute; backgroun ...

  4. tab切换效果

    选项卡是一个神奇的网页效果,不论大小网站,比如B2B像阿里巴巴,慧聪网,还有B2C这个不用说了吧,爱逛网店的童鞋们都知道的,像京东商城,淘宝网,拍拍网,一号店,凡客诚品,等等各种网各种网店,选项卡不仅 ...

  5. 谈谈一些有趣的CSS题目(八)-- 纯CSS的导航栏Tab切换方案

    开本系列,谈谈一些有趣的 CSS 题目,题目类型天马行空,想到什么说什么,不仅为了拓宽一下解决问题的思路,更涉及一些容易忽视的 CSS 细节. 解题不考虑兼容性,题目天马行空,想到什么说什么,如果解题 ...

  6. jquery+bootstrap实现tab切换, 每次切换时都请求数据, 点击提交分别向不同的地址提交数据

    今天一个朋友叫帮做一个tab切换, 每一个tab内容区域都是从后台取出的数据, 这些数据要用表格的形式显示处理, 并且表格的内容区域可以修改, 如下所示: 例子查看请演示查看. 截图如图所示: 实现步 ...

  7. 基于zepto的H5/移动端tab切换触摸拖动加载更多数据

    以前实现移动端的滑动加载更多实现的方法是当滚动条快到页面底部时就自动加载更多的数据,在这方面很多人都用的是"西门的后花园"写的一个叫dropload的插件,这个插件用起来也很好,很 ...

  8. JavaScript的Tab切换

    在网页设计中经常要用到tab切换,遂整理了一下常用的两种方法. 先看一下示例代码: HTML: <!doctype html> <html lang="en"&g ...

  9. jquery实现tab切换完整代码

    代码如下,保存到html文件打开: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " ...

随机推荐

  1. windows-docker开发我常用命令 docker-machine ssh default

    docker-machine ssh default  docker logs test sudo systemctl start docker       docker tag IMAGEID ne ...

  2. CRF++使用小结

    1. 简述 最近要应用CRF模型,进行序列识别.选用了CRF++工具包,具体来说是在VS2008的C#环境下,使用CRF++的windows版本.本文总结一下了解到的和CRF++工具包相关的信息. 参 ...

  3. bzoj 2154 莫比乌斯反演求lcm的和

    题目大意: 表格中每一个位置(i,j)填的值是lcm(i,j) , 求n*m的表格值有多大 论文贾志鹏线性筛中过程讲的很好 最后的逆元我利用的是欧拉定理求解的 我这个最后线性扫了一遍,勉强过了,效率不 ...

  4. win10 用微软账户登录无法访问共享的问题

    百度找了一大堆可以解决的,最终最简单的方式(可能是bug): 测试了一下,Win10用微软账户登录的,连局域网共享时,输入用户名的时候,前面加个乱七八糟的域名就可以访问了: 比如: 用户名:   ba ...

  5. 访问FLASH设备-W25X16

    /************************************* *文件名称:w25x16_spi.c * *功能描述:访问和写入数据到闪存w25x16 * *建立日期:2016-03-1 ...

  6. 一点点webservice的小知识

    怕自己忘了记录下来好了 在web.config中要配置自己要调用的webservice的地址 在自己controller中获取web.config中配置的地址 SystemManager.Config ...

  7. 06-图1 List Components

    这题主要涉及到了队列,无向图的邻接矩阵表示,图的深度和广度优先搜索.又是糙哥,参考了他的程序(http://www.cnblogs.com/liangchao/p/4288807.html),主要是B ...

  8. BW增强数据源的两种方法

    BW增强数据源的两种方法 2009-04-01, by SAPBI 前言:我们经常会遇到系统标准的数据源,或者我们自建的数据源无法满足要求的情况,这个时候在数据源中添加几个相关的字段,可能就能满足我们 ...

  9. TVB-Gone 红外编码方法

    每次都重新推算一遍,年纪大了还是记录一下吧(硬件版的TV-B-Gone的压缩编码跳过此段往下看) N900上有个TVB-Gone的程序,但是程序的红外编码往往都是对应的国外的电视,好多国产电视都不支持 ...

  10. CGI标准简介 ~ Django

    CGI CGI(Common Gateway Interface)是WWW技术中最重要的技术之一 , 有着不可替代的重要地位 , CGI是外部应用程序(CGI程序)于Web服务器之间的接口标准 , 实 ...