gpt4 book ai didi

html - 如何在页面右下角添加Div

转载 作者:搜寻专家 更新时间:2023-10-31 22:59:30 25 4
gpt4 key购买 nike

我正在尝试向我的网站添加聊天功能,所以我想在页面右侧底部添加一个 Div,与本网站所示类似

http://kopatheme.com/demo/great-blog-free-web-template/

为此,我使用了一个 HTML 示例

这是我完整的 HTML 页面

   <!DOCTYPE html>
<html>
<head>
<style>
#tawkchat-minified-container {
margin: 0;
border: 0 none;
padding: 0;
cursor: pointer;
z-index: 999999;
position: absolute;
top: 0;
bottom: 0;
width: auto;
height: auto;
left: 0;
right: 0;
border: 1px solid #e3e0e7;
border-bottom: 0;
-webkit-background-clip: padding-box;
-moz-background-clip: padding;
background-clip: padding-box;
}
.border-corner {
border-radius: 8px 8px 0px 0px !important;
-moz-border-radius: 8px 8px 0px 0px !important;
-webkit-border-radius: 8px 8px 0px 0px !important;
}
.theme-background-color {
background-color: #7fb06f;
}
html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary, time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-size: 100%;
vertical-align: baseline;
background: transparent;
}
div {
display: block;
}
p {
display: block;
-webkit-margin-before: 1em;
-webkit-margin-after: 1em;
-webkit-margin-start: 0px;
-webkit-margin-end: 0px;
}
.theme-text-color {
color: #ffffff;
}
</style>
</head>
<body>
<div id="tawkchat-minified-container" class="theme-background-color border-corner">
<div id="tawkchat-status-middle">
<div id="tawkchat-status-text-container" class="theme-text-color">
<p id="tawkchat-status-message"><span id="short-message">Offline</span></p>
</div>
<div id="tawkchat-minified-agent-container" class="theme-text-color">
<p id="tawkchat-minified-agent-information-wrapper"></p>
</div>
<div id="tawkchat-minified-link-container">
<a href="javascript:void(0);" id="maximizeChat" title="Maximize">
<div class="icon"></div>
</a>
</div>
</div>
</div>
</body>
</html>

并应用了 CSS,但是当我运行上面的 HTML 时,没有显示任何相关内容。

你能告诉我如何将类似的div添加到页面吗??

https://jsfiddle.net/aarrLL02/

最佳答案

嗨,现在定义这个 css

定义 position fixed 而不是 absoluteremove top left position 只添加bottomright 像这样

#tawkchat-minified-container {
position: fixed;
bottom: 0;
width: 200px;
right: 0;}

Demo

关于html - 如何在页面右下角添加Div,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34415566/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com