asp.net - 使用 CSS 固定定位定位中心元素

标签 asp.net css

无法使使用 CSS“top and left and position:fixed attributes”定位的元素居中。

最佳答案

Position fixed 将元素放置在浏览器的引用位置,而不是父元素。请参阅有关 position:fixed -

的摘录

Generates an absolutely positioned element, positioned relative to the browser window. The element's position is specified with the "left", "top", "right", and "bottom" properties

来自 here

您可能想使用 position: relative,但没有源代码就很难确定。

关于asp.net - 使用 CSS 固定定位定位中心元素,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4820628/

相关文章:

c# - ReadAllLines() 函数是否内置了 try-catch?

c# - 全局异常处理程序是否意味着删除不必要的 try catch block ?

javascript - 网站在一个域上的 IE9 上表现不同,但完全相同的站点在不同域上表现良好

css - 弹出导航菜单

c# - 从 FormsAuthentication.Authenticate 中删除用户名/密码的区分大小写

javascript - 大量 ScriptResource.axd - 这是由 ASP.NET AJAX 引起的吗?

c# - 有什么方法可以保护 asp.net MVC4 web 应用程序免受来自外部网站的请求?

css - @font-face渲染

c# - 你能推荐一个格式化 C# 代码的 CSS 样式表吗?

css - Win8 上的字体端IE 版本兼容性调试工具(从IE 8 9 10 11 轻松转换)是什么?