请帮我生成一个西门子opcenter风格的html对话框,对话框里有个下拉菜单和一个富文本框,还有确认按钮和取消按钮,标题栏颜色是#005f87
时间: 2023-12-10 19:37:13 浏览: 32
好的,我可以帮你生成一个基于西门子opcenter风格的HTML对话框。以下是代码示例:
```html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>西门子opcenter风格的HTML对话框</title>
<style>
body {
font-family: Arial, Helvetica, sans-serif;
background-color: #f2f2f2;
}
.dialog-box {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-color: #fff;
border-radius: 8px;
box-shadow: 0 2px 8px rgba(0,0,0,0.3);
text-align: center;
padding: 20px;
max-width: 500px;
width: 90%;
z-index: 9999;
}
.dialog-box-title {
font-size: 24px;
font-weight: bold;
color: #fff;
background-color: #005f87;
padding: 10px;
border-top-left-radius: 8px;
border-top-right-radius: 8px;
}
.dialog-box-content {
margin: 20px 0;
text-align: left;
}
.dialog-box-label {
display: block;
margin-bottom: 5px;
font-weight: bold;
}
.dialog-box-select {
width: 100%;
padding: 5px;
border-radius: 3px;
border: 1px solid #ccc;
margin-bottom: 10px;
}
.dialog-box-textarea {
width: 100%;
height: 100px;
padding: 5px;
border-radius: 3px;
border: 1px solid #ccc;
margin-bottom: 10px;
}
.dialog-box-buttons {
text-align: center;
margin-top: 20px;
}
.dialog-box-buttons button {
padding: 10px 20px;
border-radius: 5px;
margin-right: 10px;
cursor: pointer;
}
.dialog-box-buttons button.confirm {
background-color: #005f87;
color: #fff;
border: none;
}
.dialog-box-buttons button.cancel {
background-color: #ccc;
color: #fff;
border: none;
}
</style>
</head>
<body>
<div class="dialog-box">
<div class="dialog-box-title">对话框标题</div>
<div class="dialog-box-content">
<label class="dialog-box-label">下拉菜单:</label>
<select class="dialog-box-select">
<option value="option1">选项1</option>
<option value="option2">选项2</option>
<option value="option3">选项3</option>
</select>
<label class="dialog-box-label">富文本框:</label>
<textarea class="dialog-box-textarea"></textarea>
</div>
<div class="dialog-box-buttons">
<button class="confirm">确认</button>
<button class="cancel">取消</button>
</div>
</div>
</body>
</html>
```
你可以将这段代码保存为一个HTML文件,然后在浏览器中打开预览效果。