html - 表格背景

标签 html css forms

如何在 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/

相关文章:

Jquery slider 在事件时显示 div 文本

c# - 识别 KeyDown 中的菜单键

javascript - 带有基于选择选项的条件表单操作的预订表单

html - 将 JPEG 图层添加到 Canvas(使用 Caman)

javascript - Jquery .each() 呈现 [object HTMLUListElement] 而不是 HTML

html - 将输入与具有背景图像的标签垂直对齐

php - 我如何删除 bootstrap 3 中这些图像之间的空白

html - 网站响应时间: Difference between `Load` and `Finish`

Javascript 原型(prototype)-轮播

php - 下拉选择的项目在 mysql 数据库中无法正确显示