在CSS中为RSS提供样式

问题描述 投票:0回答:2

我有以下RSS提要:

https://jsfiddle.net/yhtf36a1/

现在,它会一个接一个地显示出来。

如何使用CSS使其每行显示两个项目,以便它看起来如下所示? enter image description here

我尝试使用display:inline-block,但这不起作用。

php css
2个回答
0
投票

希望这可以帮助

*{font-family:arial}
.rssRow{display:flex}
.entry-wrapper{display:inline-block; margin:.25em;background:#f3f3f3; border:3px solid #f1f1f1; background:#FFF;padding:10px;border-radius:5px;}
.entry-wrapper:hover{background:#edfdff;border:3px solid #f4f4f4}
.entry-image{float:left;}
.entry-text{float:left;}
.entry-title h4{margin:0; font-size:1.5em;font-weight:bold;}
.entry-title h4 a {color:#333; text-decoration:none;}
.entry-title h4 a:hover{text-decoration:underline;}
.entry-date{color:#999; padding-bottom:.75em;font-size:.75em}

https://jsfiddle.net/itsselvam/yhtf36a1/3/预览

如有任何疑问,请告诉我


1
投票

使用以下CSS:

.entry-wrapper {
  float:left;
  width: 48%;
  background: lightblue;
  margin: 1%
}

请参阅此处的示例:jsfiddle.net/GillesCoeman/5e8z00z1

© www.soinside.com 2019 - 2024. All rights reserved.