我在环顾网络,看到有关img和报价的帖子,每次页面刷新时都会发生变化,而且这是在堆栈溢出 这里是代码,信贷发给原始开发者,但我只是想知道在哪里可以添加类IMG圈,以便它在CSS工作,以对图像中的圆形边框,对不起,这是我在#2的第一篇文章如何添加设置的边界半径?
(function() {
var quotes = [
{
text: "text1",
img: "http://i.stack.imgur.com/FqBE6.jpg?s=32&g=1"
},
{
text: "text2",
img: "https://www.gravatar.com/avatar/ca3e484c121268e4c8302616b2395eb9?s=32&d=identicon&r=PG",
}
];
var quote = quotes[Math.floor(Math.random() * quotes.length)];
document.getElementById("quote").innerHTML =
'<p>' + quote.text + '</p>' +
'<img src="' + quote.img + '">';
})();