我确定之前已经回答过此案例 - 但我找不到任何有用的方法可以解决问题......
我试图将聊天框div
设置到页面底部,我需要将其放置但不是固定的,我还需要保持页面尽可能多的响应。
正如您所见Here,聊天框浮动在右侧div
左侧 - 我希望它们之间有空格,让聊天打开而不是向下... < / p>
以下是一些带有更明确解释的图片
这是我希望实现的目标:
以下是我希望在聊天窗口打开时实现的目标:
这是我目前的状态:
答案 0 :(得分:2)
我认为这是您正在寻找的答案,请查看此问题,Fork
或您的代码。
我刚为你的.faq_chat
课程添加了一些额外的风格。
.faq_chat{
padding: 30px 30px 30px 30px;
width: 66.66666667%;
background-color: #d2f1f0 ;
z-index: 99;
position: fixed;//my style
right: 0;//my style
bottom: 0;//my style
}
<强> Fiddle 强>
答案 1 :(得分:0)
#div{
position: fixed;
bottom: 0px;
width: 80%;
}
答案 2 :(得分:0)
这是因为# For more information see the manual pages of crontab(5) and cron(8)
#
# m h dom mon dow command
30 2 * * 1 /usr/local/sbin/certbot-auto renew >> /var/log/le-renew.log 2>&1
css
在上面的css中,你给出的高度.faq_cont_left {
background-color: gray;
float: left;
width: 33.3333333%;
height: 800px;
}
比块css高4倍
800px
在这个CSS中你给200px。所以你可以这样做
.faq_cont_right {
float: right;
padding: 0;
width: 66.66666667%;
height: 200px;
background-color: blue;
}
的高度降低为.faq_cont_left
200px
的高度增加到.faq_cont_right
希望这会对你有所帮助
答案 3 :(得分:0)
你可以看到flex,除了你以外是什么。
Flex指南:https://css-tricks.com/snippets/css/a-guide-to-flexbox/
html, body {
min-height:100%;
height:100%;
}
body {
display:flex;
flex-direction:column;
margin:6px;
background:red;
}
.my-app { /** Or just use "body" for your app container, if you want **/
height:100%;
display:flex;
flex-direction:column;
background:#f5f5f5;
}
.header {
background:lightgreen;
height:80px;
display:flex;
align-items:center;
justify-content:center;
color:#fff;
}
.somecontent {
background:tomato;
padding:20px 0;
margin:10px 0;
color:#fff;
}
.chat {
background:lightblue;
margin:auto 0 5px 0;
padding:10px;
}
<div class="my-app">
<div class="header">
My app name
</div>
<div class="somecontent">
Some content...
</div>
<div class="chat">
My beautiful chat
</div>
</div>
答案 4 :(得分:0)