你好,我想通過使用所有的CSS,如果可能的話,在背景圖像淡入我的網站。當用戶訪問主頁時,我希望圖像淡入。我遇到問題了,除非我必須添加jQuery或JavaScript才能這樣做。這裏是我的代碼:如何使頁面加載時使用css淡入背景圖片?
<!doctype html>
<html>
<head>
<title>Paradox Entertainment</title>
<meta charset="utf-8" />
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type="text/css">
body {
margin:0;
font-family:arial,helvetica,sans-serif;
background-image:url("images/2_petski.jpg");
background-position: center;
background-repeat: no-repeat;
background-color:#000000;
color: #ffffff;
padding: 350px;
}
ul {
list-style: none
}
</style>
</head>
<body>
</body>
</html>
謝謝你在前進,如果我能得到任何形式的資源或代碼幫助。
http://stackoverflow.com/questions/11679567/using-css-for-fade-in-effect-on-page-load –
身體是空的!我們不是在這裏爲你寫代碼! –
我不希望你爲我的身體@PraveenKumar編寫代碼。我正在尋找一個函數或一個可能的CSS方法。 – user2627437