当前位置:首页 » 操作系统 » divcss源码

divcss源码

发布时间: 2023-04-01 16:53:26

Ⅰ 求纯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(); //隐藏子栏 }); 效果图如下:



Ⅱ 你好,请教下织梦做的div+css源码网站能改成自适应吗

你犯了两个错误: 一、position不能设为absolute,否则自动边距是无效的,也不能使用浮动定位。 二、左右边距都要设为自动才能居中。 这样就可以了: css"> .d {     width: 二00px;     height: 三50px;     background-color: #000;     margin-top: 二0px;     margin-left: auto;     margin-right: auto; } dddd   如有帮助,请点击采纳按钮,谢谢支持~

Ⅲ 求 CSS+div 浮动实例 要有html 和 css 源码

纯css做不了.因为不知道你顶部高度.
如果用针对浏览器位置,那么上面的空白区域的高度就得保证下面的菜单能显示出来.
如果用绝对定位.那么就得用js修改位置.

Ⅳ 想找个div+css布局的网站源码,最好是php的!谁能不能共享下啊

有很多开源的系统下载的。各种cms也可以的。比如康盛创想系统的,或者phpcms之类的。
div+css布局只是前端显示的问题。模板是就是的。

Ⅳ div css 对齐问题(附源码)

style之间加个body {margin: 0px;} 即可解决问题的。。

Ⅵ 谁有[Div+CSS3.0网页布局案例精粹源代码]的源代码

虽然我没有源代码,不过可以推荐你去 w3cschool ,这个是最全的,基本不用看别的了

Ⅶ 为什么我设置了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

Ⅸ 请帮我用DIV+CSS的格局弄一个源代码出来,谢谢分开两段谢谢!

20分太少了.要知道你的这个效果是很费时间的.

Ⅹ 求大神帮我用DIV+CSS做一个简单的网页,求源代码

只要有事件发生,就需要js,比如你的“只需要鼠标点击菜单的时候会出现下拉菜单”,除非你的菜单是个<select>

热点内容
取舍算法 发布:2024-10-18 16:12:36 浏览:249
安卓数据线一般在什么价位 发布:2024-10-18 16:09:25 浏览:732
老式安卓机怎么插卡 发布:2024-10-18 15:52:35 浏览:338
pc搭建nas服务器 发布:2024-10-18 15:51:59 浏览:266
androidimei 发布:2024-10-18 15:51:56 浏览:292
c语言零基础入门 发布:2024-10-18 15:46:42 浏览:188
比特币如何存储 发布:2024-10-18 15:31:36 浏览:615
云服务相比传统服务器有哪些优势 发布:2024-10-18 15:26:20 浏览:679
sql10进制转16进制 发布:2024-10-18 15:25:33 浏览:865
错误日志上传 发布:2024-10-18 15:08:45 浏览:270