cssdiv源码
⑴ 求纯CSS+DIV实现的二级横向菜单源代码是CSS+DIV实现的,不要JS的!有图片参考!!
为什么不要js的呢?用js不是很简单吗,又不会产生那么多需要兼容的问题。 jquery水平二级导航栏实例 a{text-decoration: none;outline: none;cursor:pointer;color:white;} ul{ list-style: none;} ul li{float: left;margin: 0;padding:7px 7px 0px 7px;border-right:1px dotted white;height:25px;background:tomato;font-size:14px;color:white;text-align:center;} li a{display: block;} ul li span{display:none;position: absolute;z-index: 1000;background: red; color: #fff;margin-top:10px;padding: 5px; /**设置子栏绝对定位*/ width:auto; _width:100px;/**IE6下无法通过设置为auto来自适应子栏的宽度,所以做了一个折中的设置*/ -moz-border-radius-bottomright: 5px; /**为子栏增加圆角样式,只能在Chrome和FF下显示良好,IE下无效*/ -khtml-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; -moz-border-radius-bottomleft: 5px; -khtml-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px;} ul li span a{color:white;display:inline;}/**使子栏水平显示*/ ul li span a:hover{color:tomato;background:white;} 首页 项目一 1.1 1.2 1.3 项目二 2.1 2.2 2.3 项目三 3.1 3.2 3.3 帮助 $("ul li").hover(function() { $(this).css({ 'background' : 'red'}); $(this).find("span").show(); //显示子栏 } , function() { $(this).css({ 'background' : 'tomato'}); $(this).find("span").hide(); //隐藏子栏 }); 效果图如下:⑵ css+div的边框是花纹的,怎样用代码写出来
css+div的边框是花纹的,其代码为:
css:#dash{border:1px dashed red;width:200px;height:60px;}
html:<div id="dash"></div>
⑶ 用div+css怎么写出这个样子的,要源代码,重复的部分不要写,谢谢
<style>
body{margin:0;padding:0;font:12px"微软雅黑";background:#ddd}
.main{margin:0auto;width:750px}
.section{margin:0010px;padding:5px;text-align:center;background:#fff}
</style>
<divclass="main">
<divclass="section">
<imgsrc="/"alt="">
<h2>标题</h2>
<divclass="secmain">内容</div>
</div>
<divclass="section">...</div>
<divclass="section">...</div>
</div>
⑷ 求 CSS+div 浮动实例 要有html 和 css 源码
纯css做不了.因为不知道你顶部高度.
如果用针对浏览器位置,那么上面的空白区域的高度就得保证下面的菜单能显示出来.
如果用绝对定位.那么就得用js修改位置.
⑸ div css 对齐问题(附源码)
style之间加个body {margin: 0px;} 即可解决问题的。。
⑹ 跪求 QQ空间(CSS+DIV)源码,不胜感激!
你要想要整个QQ空间的源码,几乎没人给的了你,只能自已动手
方法一、装个火狐用F12开发者工具看下,包括css都能看到,也可以复制的!
方法二、去下载个扒网页的软件,自已去扒就行了。
望采纳,谢谢:)
⑺ 谁有[Div+CSS3.0网页布局案例精粹源代码]的源代码
虽然我没有源代码,不过可以推荐你去 w3cschool ,这个是最全的,基本不用看别的了
⑻ 《CSS彻底研究》和《CSS/DIV》页面布局设计 实例源码 那位朋友提供一下
东西太大 自己下载
http://www.verycd.com/topics/2797826/
http://www.verycd.com/topics/2741979/
看清楚 视频和光盘都有!!!!!!!!!!!!!!!!
⑼ 为什么我设置了DIV+css样式而在源代码中出不来,意思就是在CSS文件中设置了样式,但在源代码中使用时无效
也许是你css引用的路径不对,或者你把css样式放到html文件中去,看看样式真否能出来。如果出不来那就是你css有错误了,浏览器无法继续执行下去。
<style>你的css内容</style>把这个放在<head></head>之间
⑽ CSS网页怎么用DIV写出如图中的效果,求源代码![email protected]
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script language="javascript" src="jquery.js"></script>
<script>
$(document).ready(function(){
$("#top").find("div").each(function(i,n){
$(this).click(function(){
$("#bottom").find("table").each(function(){
if($(this).css("display")=="block"){
$(this).css("display","none");
}
});
$("#bottom table:eq("+i+")").css("display","block");
});
});
});
</script>
<title>服装</title>
<style>
.top { width:auto;
height:30px;
margin-bottom:2px;
}
.bottom { width:300px;
height:194px;
margin-left:10px;
}
.choice { width:60px;
height:30px;
line-height:30px;
text-align:center;
border:#CCCCCC 1px solid;
float:left;
margin-left:10px;
}
</style>
</head>
<body>
<div class="top" id="top">
<div class="choice" id="women">女装</div>
<div class="choice" id="man">男装</div>
<div class="choice" id="child">童装</div>
</div>
<div class="bottom" id="bottom">
<table width="300" border="1" style="display:block;">
<tr>
<td>高级成衣</td>
<td>高级成衣</td>
</tr>
<tr>
<td>高级成衣</td>
<td>高级成衣</td>
</tr>
<tr>
<td>高级成衣</td>
<td>高级成衣</td>
</tr>
<tr>
<td>高级成衣</td>
<td>高级成衣</td>
</tr>
<tr>
<td>高级成衣</td>
<td>高级成衣</td>
</tr>
<tr>
<td>高级成衣</td>
<td>高级成衣</td>
</tr>
<tr>
<td>高级成衣</td>
<td>高级成衣</td>
</tr>
</table>
<table width="300" border="1" style="display:none;">
<tr>
<td>男装</td>
<td>男装</td>
</tr>
<tr>
<td>男装</td>
<td>男装</td>
</tr>
<tr>
<td>男装</td>
<td>男装</td>
</tr>
<tr>
<td>男装</td>
<td>男装</td>
</tr>
<tr>
<td>男装</td>
<td>男装</td>
</tr>
<tr>
<td>男装</td>
<td>男装</td>
</tr>
<tr>
<td>男装</td>
<td>男装</td>
</tr>
</table>
<table width="300" border="1" style="display:none;">
<tr>
<td>童装</td>
<td>童装</td>
</tr>
<tr>
<td>童装</td>
<td>童装</td>
</tr>
<tr>
<td>童装</td>
<td>童装</td>
</tr>
<tr>
<td>童装</td>
<td>童装</td>
</tr>
<tr>
<td>童装</td>
<td>童装</td>
</tr>
<tr>
<td>童装</td>
<td>童装</td>
</tr>
<tr>
<td>童装</td>
<td>童装</td>
</tr>
</table>
</div>
</body>
</div>
</html>
单纯css是无法做到的,我这个是用jquery写的,你测试的时候下载一个jquery.js