У меня есть html-страница с градиентом фона. Тогда у меня есть изображение перед этим. Я хотел бы, чтобы этот образ имел непрозрачность 0,2. Тогда у меня есть форма. Прозрачность набора полей установлена равной 0,95. Тем не менее, когда я запускаю скрипт, вся страница (кроме заголовка) имеет непрозрачность .2 Как получить ее, где только изображение равно 0,2, а форма остается 0,95 Я пробовал различное позиционирование, и я не могу получить Это. Мой код css и html прикреплен так же, как и снимок экрана, когда на .2-.3. 2 команды внизу CSS - это те, которые я использую в моей помощи. Спасибоhtml и CSS-изображение наложения и непрозрачности
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<script src="Scripts/Global.js"></script>
<link rel="stylesheet" type="text/css" href="Styles/Design.css">
</head>
<body>
<div id="body"><br></div>
<div id="header">
<h1>Waste Entry Form</h1>
<p id="Date"></p>
<div id="headerIcon"><img src="Images/Logos/Logo5.jpg" style="width:90px;height:40px"></div>
</div>
<div id="content"> </div>
<div id="wrapper">
<center>
<div>
<form action="DataEntry.asp" method="post" class="formstyle">
<fieldset>
<table border="0px">
<tr>
<td colspan = "2" id="formHeader">
Select Shift
</td>
</tr>
<tr>
<td class="spaceUnder" id="formBody">Day Shift
<input type="radio" name="Shift" id="dayShift" value="Day Shift">
</td>
<td align="center" class="spaceUnder" id="formBody">Evening Shift
<input type="radio" name="Shift" id="eveningShift" value="Evening Shift">
</td>
</tr>
<tr>
<td colspan = "2" id="formHeader">
Select Date and Time
</td>
</tr>
<tr>
<td class="spaceUnder" id="formBody">Date: <input type="date" id="theDate"></td>
<td align="center" class="spaceUnder" id="formBody">Time: <input type="time" value="22:15:00"></td>
</tr>
<tr>
<td colspan = "2" id="formHeader">
Enter Equipment & Waste
</td>
</tr>
<tr>
<td class="spaceUnder" id="formBody">
Type:
<select id="formSelect">
<option value="">Choose Equipment</option>
<option value="Raw Material">Raw Material</option>
<option value="Spiral Freezer">Spiral Freezer</option>
<option value="Palletizer">Palletizer</option>
<option value="Bagger">Bagger</option>
<option value="Fryer">Fryer</option>
</select>
</td>
<td class="spaceUnder" id="formBody">Scrap Waste lbs:
<input type="number" name="quantity" min="1" max="50">
</td>
</tr>
<tr>
<td align ="right" colspan = "2"> <input class="SaveIcon" title="Save" type="button1" onclick="SaveDataEntry()" style="background-image: url(Images/Save.png); cursor:pointer"></input></td>
</tr>
<br>
</form>
</table>
</fieldset>
</div>
</div>
</center>
<div id="footer">
<input title="Main Page" type="button" onclick="MainPage()" style="background-image: url(Images/Home1.bmp)"></input>
<a href="#" onclick="history.go(-1)"> <input title="Previous Page" type="button" onclick="PreviousPage()" style="background-image: url(Images/BackNav1.bmp)"></input> </a>
<input title="Data Entry Page" type="button" onclick="DataEntr()" style="background-image: url(Images/Edit1.bmp)"></input>
<a href="HeatMap.html"><input title="Heat Map" type="button" onclick="HeatMap()" style="background-image: url(Images/Fahrenheit1.bmp)"></input> </a>
<a href="SafetyScreen.html"> <input title="Safety Screen" type="button" onclick="Safety()" style="background-image: url(Images/Safety.bmp)"></input> </a>
<input title="Standard Thresholds" type="button" onclick="StandardThresholds()" style="background-image: url(Images/StandardThreshold.png)"></input>
<input title="Trending" type="button" onclick="Trending()" style="background-image: url(Images/Trend.bmp)"></input>
<input title="Alarm and Events" type="button" onclick="Alarm()" style="background-image: url(Images/Alarm.bmp)"></input>
<input title="Report Expert" type="button" onclick="ReportExpert()" style="background-image: url(Images/ReportExpert.png)"></input>
<input title="Data Entry Reports" type="button" onclick="DataEntrSSRS()" style="background-image: url(Images/DataEntry.bmp)"></input>
</div>
<script>
var d = new Date();
document.getElementById("Date").innerHTML = d.toUTCString();
</script>
<script>
var d = new Date();
document.getElementById("Date2").innerHTML = d.toUTCString();
</script>
</body>
</html>
CSS код:
html {
min-height: 100%;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
background: #70bg32;
background-repeat:no-repeat;
background: -webkit-linear-gradient(to left bottom, #0096DD, white);
background: -moz-linear-gradient(to left bottom, #0096DD, white);
background: -ms-linear-gradient(to left bottom, #0096DD, white);
background: -o-linear-gradient(to left bottom, #0096DD, white);
background: linear-gradient(to left bottom, #0096DD, white);
}
h1 {
position:relative;
color: white;
text-align: center;
bottom:30px;
font-size: 35pt;
}
h2 {
color: black;
text-align: center;
}
legend {
font-size: 1.4em;
font-weight: bold;
position: relative;
color: black;
border:2px;
}
male{
width: 10.5em;
height: 10.5em;
}
input[type=radio] {
-webkit-transform: scale(4, 4);
}
input[type=button] {
width:35px;
height: 35px;
background-color: transparent;
background-position:center;
background-repeat:no-repeat;
border:0px;
position: relative;
top: 7px;
}
input[type=button1] {
width:35px;
height: 35px;
background-color: transparent;
background-position:center;
background-repeat:no-repeat;
border:0px;position: relative;
top: 0px;
}
input[type=date] {
height:40px;
width:250px;
font-size:18pt;
}
input[type=number] {
height:40px;
width:60px;
font-size:18pt;
}
input[type=time] {
height:40px;
width:250px;
font-size:18pt;
}
table{
position:relative;
color: black;
text-align: center;
top:0;
border-spacing:0px;
border-collapse: separate;
width:100%;
height: 100%;
cursor: pointer;
}
textarea {
resize: none;
}
#formSelect{
height:40px;
width:250px;
font-size:16pt;
}
#header {
position:fixed;
width:100%;
height:60px;
background:#000000;
top:0;
left:0;
}
#formHeader {
position:relative;
height:35px;
background:#000000;
top:-18px;
left:0;
color: white;
text-align: center;
font-size:20pt;
font-weight: bold;
}
#formBody{
position:relative;
height:35px;
top:0px;
left:0;
color: black;
text-align: center;
font-size:20pt;
font-weight: bold;
}
#formTextArea{
position:relative;
height:35px;
top:0px;
left:0;
color: black;
text-align: center;
font-size:20pt;
font-weight: bold;
}
#content {
padding:10px;
padding-bottom:80px; /* Height of the footer element */
}
#footer {
width:100%;
height:50px;
position:fixed;
bottom:0;
left:0;
background:#000000;
}
#Date{
position:relative;
color: white;
text-align: left;
top: -80px;
left:5px;
}
#headerIcon{
position:relative;
color: white;
text-align: right;
top: -140px;
right:5px;
}
#forms{
display:inline-block;
max-width:100%;
}
p#formTitles {
color: white;
position:relative;
text-align: center;
font-size:10pt;
font-weight: bold;
}
#waterMark{
opacity: 0.1;
min-height: 100%;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
min-height: 100%;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
background-image: url("../Images/Logos/download42.jpg");
background-repeat:no-repeat;
}
.TriLogo1{
width:90px;
height:120px;
position: fixed;
top:120px;
left:150px;
}
.spaceUnder{
padding-bottom: 2em;
padding-top: 2em;
}
.spaceAbove{
padding-top: 0em;
}
.spaceUnderTitle{
padding-bottom: 1em;
}
#wrapper {
background:transparent url("../Images/Logos/download42.jpg") no-repeat center center;
min-height: 100%;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
min-height: 100%;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
position:relative;
top:120px;
opacity:0.9; /* I need this to not effect the form as well. i want this low like .2 */
background-repeat:no-repeat;
}
fieldset{
border:1;
min-height: 100%;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
background: #70bg32;
background-repeat:no-repeat;
background: -webkit-linear-gradient(to left bottom, #2A59A1, white);
background: -moz-linear-gradient(to left bottom, #2A59A1, white);
background: -ms-linear-gradient(to left bottom, #2A59A1, white);
background: -o-linear-gradient(to left bottom, #2A59A1, white);
background: linear-gradient(to left bottom, #2A59A1, white);
display:inline;
width:60%;
padding:0px;
border-spacing:0px;
border-collapse: separate;
opacity:0.95;
position:relative;
}