如何让"mymessage.gif"显示"bread_wine.jpg".
mymessage.gif具有透明背景.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>overlap images</title>
<style type="text/css">
<!--
#navbar {
font-size: 18px;
font-weight: bold;
text-align: center;
}
#thebigimage {
background-image: url(bread_wine.jpg);
height: 548px;
width: 731px;
margin-right: auto;
margin-left: auto;
}
#overlapthis {
background-image: url(mymessage.gif);
}
-->
</style>
</head>
<body>
<div id="navbar">this is the nav bar</div>
<div id="thebigimage">
<div id="overlapthis"></div>
</div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud) 我正在使用javascript来更改带有onclick事件的div标签的显示.div位于页面的底部,何时和/或如果需要,用户可以打开div.当div更改为display:block时,如何让页面向下滚动?
仅供参考:我试过了
var objDiv = document.getElementById("the_div_id");
objDiv.scrollTop = objDiv.scrollHeight;
Run Code Online (Sandbox Code Playgroud)
该页面不会向下滚动.有任何想法吗?
可能重复:
列出我电脑上的所有文件夹(php)
我试过了:
$handle = opendir($path);
Run Code Online (Sandbox Code Playgroud)
但路径是什么?我把除厨房水槽之外的所有东西放在那里!我无法让它发挥作用.我现在在我的localhost上.
我做了:
opendir(dirname(__FILE__));
Run Code Online (Sandbox Code Playgroud)
这是一个工作......
$dir = dirname(__FILE__);
// Open a known directory, and proceed to read its contents
if(is_dir($dir))
{
if($dh = opendir($dir))
{
while(($file = readdir($dh)) !== false)
{
echo "filename: ".$file."<br />";
}
closedir($dh);
}
}
Run Code Online (Sandbox Code Playgroud)
会做一些清理来获取我想要的信息.但是,感谢Stackoverflow中的"一些",我更喜欢这个代码,对于localhost应用程序来说更好.
foreach(glob("*") as $filename)
{
echo $filename."<br />";
}
Run Code Online (Sandbox Code Playgroud)