怎么用css写背景图像

【字号: 日期:2024-08-25浏览:49作者:雯心
怎么用css写背景图像代码:

<html>

<head>

<style type="text/css">

body

{ background-image:url(/i/eg_bg_03.gif); background-repeat:no-repeat; background-attachment:fixed; background-position:center; }

</style>

</head>

<body>

<body>

<p>

<b>提示:</b>

您需要把 background-attachment 属性设置为 "fixed",才能保证该属性在 Firefox 和 Opera 中正常工作。

</p>

</body>

</body>

</html>

效果:

怎么用css写背景图像

以上就是怎么用css写背景图像,希望大家喜欢,请继续关注乐呵呵网。
相关文章: