gpt4 book ai didi

CSS - 定位

转载 作者:行者123 更新时间:2023-11-27 22:39:27 24 4
gpt4 key购买 nike

一个。图片 (960x7)b. div(宽度:960,填充:10)

我想定位 (a),使其距顶部 50 像素,居中。我想将 (b) 放置在 (a) 的正下方,没有空格。

我的 CSS 如下:

@charset "utf-8";
* {margin:0;padding:0;}
body {background-color:#999;}
.pagetop {margin:50 auto;background:url(../img/pgtop.gif) top center no-repeat;}
.page {margin:0 auto;width:960px;background-color:#fff;padding:10px;}

我的 HTML 如下:

<body>
<div class="pagetop" />
<div class="page">
<p>Warning <a href="#">sign</a>, warning sign...I see it but I...pay it no mind.</p>
</div>

我正在尝试创建一个在灰色背景上具有圆 Angular 边缘的白色容器。我怎样才能简单而智能地做到这一点?

最佳答案

检查圆边的这个问题:

CSS Rounded corners

对于对象的定位,我会采用这样的方式:

topimage {
position: absolute;
top: 50px;
text-algin: center;
}

关于CSS - 定位,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1132880/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com