油猴脚本里 怎样在这两个按钮之间加上空格或距离分开让画面更美? 创建一个包含按钮的div元素 const div = documentcreateElementdiv; divsetAttributeid myFloat; divsetAttributestyle position fixed !important;top 56px
你可以在两个按钮之间添加一个空的元素,然后设置它的宽度或者使用margin属性来分隔按钮。例如:
const space = document.createElement('span'); space.innerHTML = ' '; //两个空格 div.appendChild(space);
或者:
space.style.marginLeft = '10px'; //设置左边距为10像素
原文地址: https://www.cveoy.top/t/topic/bdPY 著作权归作者所有。请勿转载和采集!