TA的每日心情 | 慵懒 2022-3-8 01:49 |
---|
签到天数: 2 天 [LV.1]初来乍到
初级工程师
- 积分
- 59
|
悬赏1油猫币未解决
(function () {
'use strict';
var div = document.createElement("div");
var body = document.querySelector("body");
if (window.top == window.self) {
body.appendChild(div);
}
div.innerHTML = `
<link rel="stylesheet" />
<div class="box_1">
<span>复制标题</span>
<i class="fa fa-file-text-o fa-2x" aria-hidden="true"></i>
</div>
<style>
.box_1{
position: fixed;
display: flex;
top: 100px;
left: -103px;
width: 150px;
height: 30px;
z-index: 99999;
font-size: 15px;
cursor: pointer;
align-items: center;
transition: .6s;
background: linear-gradient(225deg, transparent .5em,rgba(0, 0, 0, 0.5));
}
.box_1 i{
position: absolute;
margin-left: 10px;
right: 0;
}
.box_1 span{
margin-left: 5px;
}
.box_1:hover{
left: 0;
}
</style>`
var title = document.title;
var url = document.URL;
var span = document.querySelector(".box_1 span");
div.onclick = function () {
}
})();
这是悬浮窗按钮 为什么我启动多个悬浮窗的话 他们会自动叠加到一起呢 即使更改top left这些他也会自动叠加到一起 请问这个该怎么解决呢
|
|