如何将其应用于 ASP.net 中的 contentPlaceHolder?
#control {
position: absolute;
right: 0px;
top: 0px;
}
#control {
position: absolute;
right: 0px;
top: 0px;
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你不能。这是因为 ContentPlaceHolder 不会呈现到页面上的任何内容。
但是,您可以将 div 包裹在其周围,然后将样式应用于它:
You cannot. That's because ContentPlaceHolder does not render to anything on a page.
You can however wrap a div around it and then apply the styles to it:
如果您的目的是渲染 div 元素,我建议您改用面板控件。如果您愿意,您仍然可以添加/删除子控件(与 ContentPlaceHolder 一样)。
If your intension is to render out a div-element I would suggest that you used the Panel-control instead. You can still add/remove child Controls if you'd like (as with the ContentPlaceHolder).