Css 如何放置<;a>-阻塞到当前的右下角<;部门>;?
我有一个带有新闻的Css 如何放置<;a>-阻塞到当前的右下角<;部门>;?,css,html,Css,Html,我有一个带有新闻的,我需要把作者放在右下角 我试着用 <a href="..." style="position: relative; right: 0; bottom: 0;">Autnor name</a> 但它不起作用 我对此没有更多的想法。 谢谢只要说你的课上有课本就行了: <div class=book style="position: relative; width: 200px; height: 120px;background:#ccc; ma
,我需要把作者放在右下角
我试着用
<a href="..." style="position: relative; right: 0; bottom: 0;">Autnor name</a>
但它不起作用
我对此没有更多的想法。
谢谢只要说你的课上有课本就行了:
<div class=book style="position: relative; width: 200px; height: 120px;background:#ccc; margin-bottom:20px; display:block;">
<a href="..." style="position: absolute; right: 0; bottom: 0;">Autnor name</a>
</div>
使用“绝对位置”时,使父对象成为相对对象非常重要
演示:只要说你的部门有教材:
<div class=book style="position: relative; width: 200px; height: 120px;background:#ccc; margin-bottom:20px; display:block;">
<a href="..." style="position: absolute; right: 0; bottom: 0;">Autnor name</a>
</div>
使用“绝对位置”时,使父对象成为相对对象非常重要
演示:这里有三种位置类型:静态、相对和绝对 所有元素默认为静态 绝对元素将相对于其最近的父元素进行定位,而父元素不是静态定位的。这就是为什么人们经常将一个元素定位为“相对的”,而不打算改变它的位置 因此,在这种情况下,
#b
相对于主体(从技术上讲,文档)进行定位
在您的情况下,您可以这样定位它:
<article style="position: relative">
<a href="..." style="position: absolute; bottom: 0; left: 0;">The Author</a>
</article>
这里有三种位置类型:静态、相对和绝对 所有元素默认为静态 绝对元素将相对于其最近的父元素进行定位,而父元素不是静态定位的。这就是为什么人们经常将一个元素定位为“相对的”,而不打算改变它的位置 因此,在这种情况下,
#b
相对于主体(从技术上讲,文档)进行定位
在您的情况下,您可以这样定位它:
<article style="position: relative">
<a href="..." style="position: absolute; bottom: 0; left: 0;">The Author</a>
</article>
fiddle链接将非常有用。请提供一个链接。小提琴链接将非常有用。请提供一个链接。