javascript - 脚本表的错误位置

标签 javascript html css

我正在使用下一个 CSS:

.table {
    position:static;
    width: 300px;
    height: 300px;
    margin-left: auto;
    margin-right: auto;
    left:0;
    right:0;
}

显然,我在它们所属的地方使用了它们。但我还在其他页面添加了一些脚本:

<script language="javascript">
    var left = (screen.width/2)-(300/2);
    var top = (screen.height/2)-(300/2);
    window.open('page.aspx?' + window.location.href.toString().split('?')[1], 'PopUp', 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=300, height=300, top=' + top + ', left=' + left);
    window.open('', '_self').close(); 
</script>

我几个小时以来想要的只是处于正确的位置,顶部和左侧之间没有白线。而且我不知道我还必须做什么。

随时欢迎帮助。

最佳答案

你需要的只是另一种风格

html, body {
    margin: 0;
    padding : 0;
}

关于javascript - 脚本表的错误位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30876491/

相关文章:

javascript - 如何创建 7 Angular 分量?

javascript - jquery 的 every() 在 Internet Explorer 上不起作用

javascript - 循环更改背景图像

c# - 我可以用这样的中断标记安全地替换新行吗?

html - 页脚中的列在彼此下方显示

javascript - 试图把这一切都集中在一条线上

html - Material Angular 扩展面板示例不起作用

javascript - 如何使用 Jquery 选择特定的嵌套元素

css - 溢出实际上是如何在这里工作的?

html - 在 <head> 元素之外使用 &lt;style&gt; 标签是否正确?