Koo*_*bin 66 css cross-browser
我试图将我的div 放在屏幕右下方的一些笔记中,这些笔记将一直显示.
我使用了以下css:
#foo
{
position: fixed;
bottom: 0;
right: 0;
}
Run Code Online (Sandbox Code Playgroud)
它适用于Chrome 3和Firefox 3.6,但IE8糟透了......
什么是适合它的解决方案?
sew*_*ewa 105
此代码段至少在IE7中有效
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Test</title>
<style>
#foo {
position: fixed;
bottom: 0;
right: 0;
}
</style>
</head>
<body>
<div id="foo">Hello World</div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
Mor*_*oth 10
我没有IE8来测试它,但我很确定它应该工作:
<div class="screen">
<!-- code -->
<div class="innerdiv">
text or other content
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
和css:
.screen{
position: relative;
}
.innerdiv {
position: absolute;
bottom: 0;
right: 0;
}
Run Code Online (Sandbox Code Playgroud)
这应该将.innerdiv放在.screen类的右下角.我希望这有帮助 :)
试试这个:
#foo
{
position: absolute;
top: 100%;
right: 0%;
}
Run Code Online (Sandbox Code Playgroud)