求问html中如何在定义div中文字的位置在指定位置,用css样式,比如把文字显示在div的中下部分
方法很多,最简单的就是padding
div容器relative定位,文字放一个span或者其他容器里面absolute定位,自己设置left/top爱定位到哪都行
使用内边距padding相关属性试试
<div style="background-color:green; height:200px; padding-top: 150px;">
text
</div>
padding:1px 2px 3px 4px;属性依次为上右下左的距离
试试SVG画一个
或者用padding和margin弄