如何在 html 中为表单设置背景并为整个页面背景设置不同的图像。
最佳答案
你可以用 css 做到这一点。
将以下内容放入 <head>
您的 HTML 文档:
<style>
body{background:url(/path/to/your/body/image.jpg);}
form{background:url(/path/to/your/form/image.jpg);}
</style>
您也可以直接在 html 标签上定义这些样式,如下所示:
<body style="background:url(path/to/your/body/image/jpg);">
和
<form style="background:url(path/to/your/form/image/jpg);" method="post" action="your action">
希望对您有所帮助。
关于html - 表格背景,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4199820/