[
2007/01/19 23:12 | by 逍遥花主 ]
2007/01/19 23:12 | by 逍遥花主 ]
看到这个,也许会用的着,转过来:
前段时间发过:符合web标准的弹出菜单集是div+css+js的,现在升级成无js版的,完全用div+css实现,而且有5种样式提供参考,不过由于要在ie下面能够有好的显示多加了一些冗余代码(当ie的时候用表格来控制),但是结构还是非常清晰的,不多说了,现在就来和大家分享。
来源:CssPlay
收集整理:大龙 macrolong.com
只列出css代码,具体代码看演示。
一、最基本的:二级dropdown弹出菜单
不好描述先看演示:http://blog.macrolong.com/attachment/div...
css代码(注意看如何适应ie的)
<style type="text/css">
/* common styling */
/* set up the overall width of the menu div, the font and the margins */
.menu {
font-family: arial, sans-serif;
width:750px;
margin:0;
margin:50px 0;
}
/* remove the bullets and set the margin and padding to zero for the unordered list */
.menu ul {
padding:0;
margin:0;
list-style-type: none;
}
/* float the list so that the items are in a line and their position relative so that the drop down list will appear in the right place underneath each list item */
.menu ul li {
float:left;
position:relative;
}
/* style the links to be 104px wide by 30px high with a top and right border 1px solid white. Set the background color and the font size. */
.menu ul li a, .menu ul li a:visited {
display:block;
text-align:center;
text-decoration:none;
width:104px;
height:30px;
color:#000;
border:1px solid #fff;
border-width:1px 1px 0 0;
background:#c9c9a7;
line-height:30px;
font-size:11px;
}
/* make the dropdown ul invisible */
.menu ul li ul {
display: none;
}
/* specific to non IE browsers */
/* set the background and foreground color of the main menu li on hover */
.menu ul li:hover a {
color:#fff;
background:#b3ab79;
}
/* make the sub menu ul visible and position it beneath the main menu list item */
.menu ul li:hover ul {
display:block;
position:absolute;
top:31px;
left:0;
width:105px;
}
/* style the background and foreground color of the submenu links */
.menu ul li:hover ul li a {
display:block;
background:#faeec7;
color:#000;
}
/* style the background and forground colors of the links on hover */
.menu ul li:hover ul li a:hover {
background:#dfc184;
color:#000;
}
</style>
<!--[if lte IE 6]>
<style type="text/css">
/* styling specific to Internet Explorer IE5.5 and IE6. Yet to see if IE7 handles li:hover */
/* Get rid of any default table style */
table {
border-collapse:collapse;
margin:0;
padding:0;
}
/* ignore the link used by 'other browsers' */
.menu ul li a.hide, .menu ul li a:visited.hide {
display:none;
}
/* set the background and foreground color of the main menu link on hover */
.menu ul li a:hover {
color:#fff;
background:#b3ab79;
}
/* make the sub menu ul visible and position it beneath the main menu list item */
.menu ul li a:hover ul {
display:block;
position:absolute;
top:32px;
left:0;
width:105px;
}
/* style the background and foreground color of the submenu links */
.menu ul li a:hover ul li a {
background:#faeec7;
color:#000;
}
/* style the background and forground colors of the links on hover */
.menu ul li a:hover ul li a:hover {
background:#dfc184;
color:#000;
}
</style>
<![endif]-->
引用
前段时间发过:符合web标准的弹出菜单集是div+css+js的,现在升级成无js版的,完全用div+css实现,而且有5种样式提供参考,不过由于要在ie下面能够有好的显示多加了一些冗余代码(当ie的时候用表格来控制),但是结构还是非常清晰的,不多说了,现在就来和大家分享。
来源:CssPlay
收集整理:大龙 macrolong.com
只列出css代码,具体代码看演示。
一、最基本的:二级dropdown弹出菜单
不好描述先看演示:http://blog.macrolong.com/attachment/div...
css代码(注意看如何适应ie的)
<style type="text/css">
/* common styling */
/* set up the overall width of the menu div, the font and the margins */
.menu {
font-family: arial, sans-serif;
width:750px;
margin:0;
margin:50px 0;
}
/* remove the bullets and set the margin and padding to zero for the unordered list */
.menu ul {
padding:0;
margin:0;
list-style-type: none;
}
/* float the list so that the items are in a line and their position relative so that the drop down list will appear in the right place underneath each list item */
.menu ul li {
float:left;
position:relative;
}
/* style the links to be 104px wide by 30px high with a top and right border 1px solid white. Set the background color and the font size. */
.menu ul li a, .menu ul li a:visited {
display:block;
text-align:center;
text-decoration:none;
width:104px;
height:30px;
color:#000;
border:1px solid #fff;
border-width:1px 1px 0 0;
background:#c9c9a7;
line-height:30px;
font-size:11px;
}
/* make the dropdown ul invisible */
.menu ul li ul {
display: none;
}
/* specific to non IE browsers */
/* set the background and foreground color of the main menu li on hover */
.menu ul li:hover a {
color:#fff;
background:#b3ab79;
}
/* make the sub menu ul visible and position it beneath the main menu list item */
.menu ul li:hover ul {
display:block;
position:absolute;
top:31px;
left:0;
width:105px;
}
/* style the background and foreground color of the submenu links */
.menu ul li:hover ul li a {
display:block;
background:#faeec7;
color:#000;
}
/* style the background and forground colors of the links on hover */
.menu ul li:hover ul li a:hover {
background:#dfc184;
color:#000;
}
</style>
<!--[if lte IE 6]>
<style type="text/css">
/* styling specific to Internet Explorer IE5.5 and IE6. Yet to see if IE7 handles li:hover */
/* Get rid of any default table style */
table {
border-collapse:collapse;
margin:0;
padding:0;
}
/* ignore the link used by 'other browsers' */
.menu ul li a.hide, .menu ul li a:visited.hide {
display:none;
}
/* set the background and foreground color of the main menu link on hover */
.menu ul li a:hover {
color:#fff;
background:#b3ab79;
}
/* make the sub menu ul visible and position it beneath the main menu list item */
.menu ul li a:hover ul {
display:block;
position:absolute;
top:32px;
left:0;
width:105px;
}
/* style the background and foreground color of the submenu links */
.menu ul li a:hover ul li a {
background:#faeec7;
color:#000;
}
/* style the background and forground colors of the links on hover */
.menu ul li a:hover ul li a:hover {
background:#dfc184;
color:#000;
}
</style>
<![endif]-->
[
2007/01/18 08:29 | by 逍遥花主 ]
2007/01/18 08:29 | by 逍遥花主 ]
因为才学PHP,所以这两天一直在研究,PHPWIND论坛非JS调用最新贴子列表的方法和代码。虽然对高手来说这个再简单不过了,但对我来说这是我第一次认真写PHP代码。好在功夫不负有心人,三个小时后搞定。本来PW官方有提供调用方法,不过是JS方式的,显示很慢的说,所以才有这么多人要讲非JS调用。前几天写首页的时候,是用的JS方式调用的,主要是想先做成了后再想办法改成PHP的。其实PHP方式,就是直接查询数据库的方式,比JS少几个步骤而已。现在我的首页打开速度明显比前几天快了,高兴ING…… 把代码放在论坛里的哦,有需要的就自己COPY了,嘎嘎~~~ http://bbs.xaono.com/read.php?tid=186
[
2006/12/30 22:19 | by 逍遥花主 ]
2006/12/30 22:19 | by 逍遥花主 ]
下午下班回来就继续昨晚未完的工作,没有再用昨天的嵌入式的了,现在用BLOG本身带的模块功能,新建了个模块,加入我写的代码!调试了一下,效果不错,也没有出昨天的状况了,高兴ING!
把写的代码发上来,以备有需要的人用哈,口号是:好东西,大家分享!
代码:
<SCRIPT language="JavaScript">
<!--
var sound1="song1.mid"
var sound2="song2.mid"
var sound3="song3.mid"
var sound4="song4.mid"
var sound5="song5.mid"
var sound6="song6.mid"
var sound7="song7.mid"
var sound8="song8.mid"
var sound9="song9.mid"
var sound10="song10.mid"
var x=Math.round(Math.random()*9)
if (x==0) x=sound1
else if (x==1) x=sound2
else if (x==2) x=sound3
else if (x==3) x=sound4
else if (x==4) x=sound5
else if (x==5) x=sound6
else if (x==6) x=sound7
else if (x==7) x=sound8
else if (x==8) x=sound9
else x=sound10
if (navigator.appName=="Microsoft Internet Explorer")
document.write('<embed src='+'"'+x+'"'+'hidden="true" border="0" width="20" height="20" autostart="true" loop="true">')
else
document.write('<embed src='+'"'+x+'"'+'hidden="true" border="0" width="20" height="20" autostart="true" loop="true">')
//-->
</SCRIPT>
把写的代码发上来,以备有需要的人用哈,口号是:好东西,大家分享!代码:
<SCRIPT language="JavaScript">
<!--
var sound1="song1.mid"
var sound2="song2.mid"
var sound3="song3.mid"
var sound4="song4.mid"
var sound5="song5.mid"
var sound6="song6.mid"
var sound7="song7.mid"
var sound8="song8.mid"
var sound9="song9.mid"
var sound10="song10.mid"
var x=Math.round(Math.random()*9)
if (x==0) x=sound1
else if (x==1) x=sound2
else if (x==2) x=sound3
else if (x==3) x=sound4
else if (x==4) x=sound5
else if (x==5) x=sound6
else if (x==6) x=sound7
else if (x==7) x=sound8
else if (x==8) x=sound9
else x=sound10
if (navigator.appName=="Microsoft Internet Explorer")
document.write('<embed src='+'"'+x+'"'+'hidden="true" border="0" width="20" height="20" autostart="true" loop="true">')
else
document.write('<embed src='+'"'+x+'"'+'hidden="true" border="0" width="20" height="20" autostart="true" loop="true">')
//-->
</SCRIPT>
[
2006/12/26 21:21 | by 逍遥花主 ]
2006/12/26 21:21 | by 逍遥花主 ]
KMPlayer是一套将网路上所有能见得到的解码程式(Codec)全部 收集于一身的影音播放软体;只要安装了它,你不用再另外安装 一大堆转码程式,就能够顺利观赏所有特殊格式的影片了。除此 之外,KMPlayer还能够播放DVD与VCD、汇入多种格式的外挂字幕 档、使用普及率最高的WinAMP音效外挂与支援超多种影片效果调整选项等,功能非常强大! 这个是外观包.有好几个的,有需要的自己下了! 图:



下载文件
