我正在为我的公司制作一份 html 时事通讯,在这里遇到了一个问题。 现在我写了一些代码,从我们页面的 RSS 提要中获取文章,如标题、缩略图和摘要。
<div class="col-xs-18 col-sm-6 col-md-3" >
<div class="thumbnail">
<!--#image name="image" #--><img src="http://cloud-files.crsend.com/img/noimage.png" style="width:300px; " /><!--#/image#-->
<div class="caption" style="text-align:center;">
<!--#html name="title" #--><h4>Thumbnail label</h4><!--#/html#-->
<!--#html name="description" #--><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.
Facere, soluta, eligendi doloribus sunt minus amet sit debitis repellat.
Consectetur, culpa itaque odio similique suscipit</p><!--#/html#-->
<p><a href="#" class="btn btn-info btn-xs" role="button">Button</a> <a href="#" class="btn btn-default btn-xs" role="button">Button</a></p>
</div>
</div>
现在发生了什么。我加载 rss,选择文章,它完美地对齐左侧缩略图、标题和摘要向下。现在,当我选择一篇新文章时,它会出现在下方,但我希望它显示在正确的网站上。我知道在一个代码中直接编写它们时的解决方案,但它们是单独加载的。
附言我对 html 和 css 很陌生,如果我犯了一些明显的错误,我深表歉意。
最佳答案
对于电子邮件模板,最好使用<table>
而不是 <div>
.电子邮件模板始终需要内联 css,并且不支持 float 等某些属性。所以很难用<div>
构造一个结构在电子邮件模板中。但是 <table>
很容易
关于html - 我如何加载彼此之外的div,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48111093/