gpt4 book ai didi

html - img 外部 div

转载 作者:太空宇宙 更新时间:2023-11-04 16:10:21 24 4
gpt4 key购买 nike

我有以下内容:

.home-thumbs h2 {
background: url("images/top-left-label.png") no-repeat scroll left top #CBCBCB;
font-size: 12px;
margin-left: -8px;
margin-top: -66px;
max-width: 268px;
padding-left: 12px;
position: absolute;

我只想得到那个在我的 div 外面有一个切 Angular 的小 png,但是做不到。我应该怎么做,我在这里错过了什么?!

div 是图像标题的“标签”。我对来自推荐的工具提示有同样的问题,我不能使用带有箭头和正常边框的底部,因为我的 img 不会显示在包含的 div 之外。

谢谢。

附言HTML 和 PHP ..

<div id="home" class="home-thumbs">
<?php query_posts('cat=19&posts_per_page=1');
if(have_posts()) : while(have_posts()) : the_post(); ?>
<p class="cat-title"><?php echo single_cat_title();?></p> <?php the_post_thumbnail('medium'); ?>
<div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
<h2><?php the_title(); ?></h2>
<?php $cat_id = 19; $cat_link = get_category_link( $cat_id ); ?>
<?php the_excerpt(); ?>
<a href="<?php echo $cat_link; ?>">More in this section</a>
</div>
<?php endwhile; endif; wp_reset_query(); ?>
</div>

最佳答案

你已经绝对定位了,所以使用 topleft 正如你应该做的那样

.home-thumbs h2 {
background: url("images/top-left-label.png") no-repeat scroll left top #CBCBCB;
font-size: 12px;
max-width: 268px;
padding-left: 12px;
position: absolute;
top: -66px;
left: -8px;
}

关于html - img 外部 div,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8480838/

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