我在環顧網絡,看到有關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 + '">';
})();