html – head元素中的CSS无效

html – head元素中的CSS无效,第1张

概述我是html代码的新手,所以我对html编码没有太多的了解. 当我使用内联样式时,它似乎工作正常,但head元素内的css代码不会显示在网页中.代码对我来说似乎很好.我已尝试在Chrome和Firefox中运行此代码,但问题仍然存在于两者中.请检查我的代码和&给我任何建议或解决方案.谢谢. fieldset: { background: lightyellow; bor 我是HTML代码的新手,所以我对HTML编码没有太多的了解.
当我使用内联样式时,它似乎工作正常,但head元素内的CSS代码不会显示在网页中.代码对我来说似乎很好.我已尝试在Chrome和firefox中运行此代码,但问题仍然存在于两者中.请检查我的代码和&给我任何建议或解决方案.谢谢.

fIEldset: {    			background: lightyellow;    			border: 10px solID yellow;    			margin-bottom: 10px;    			wIDth: 720px;    		}    		label: {    			wIDth: 180px;    		}
<h1>Please Enter Your Details For Our Dating Website!</h1>    	<form action="https://ihome.ust.hk/~rossiter/cgi-bin/show_everything.PHP" method="post">    		<fIEldset>    			<legend>Your Face</legend>    			<label for="image">Your image:</label>    			<input type="file" name="image" required>    			<br>    			Image prevIEw:    			<img src="" ID="prevIEw">    		</fIEldset>    		<fIEldset>    			<legend>Your General Details</legend>    			<label for="name">name:</label>    			<input type="text" name="name" required>    			<br>    			<label for="gender">Gender:</label>    			<input type="radio" name="gender" required>    			Male    			<input type="radio" name="gender" required>    			Female    			<br>    			<label for="age">Age:</label>    			<input type="number" name="age" required>    			<br>    			<label for="dob">Date of birth:</label>    			<input type="date" name="dob">    			<br>    			<label for="color">Favorite color:</label>    			<input type="color" name="color">    			<br>    			<label for="country">Which country:</label>    			<select name="country">    				<option value="no"></option>    				<option value="en">England</option>    				<option value="in">India</option>    				<option value="jp">Japan</option>    				<option value="sp">Spain</option>    				<option value="us">USA</option>    			</select>    		</fIEldset>    		<fIEldset>    			<legend>Your Indicators</legend>    			<label for="height">Height:</label>    			Short    			<input type="range" name="height" min="0" max="100">    			Tall    			<br>    			<label for="salary">Salary:</label>    			Poor    			<input type="range" name="salary" min="0" max="100">    			Rich    			<br>    		</fIEldset>    		<fIEldset>    			<legend>Your Contact information</legend>    			<label for="email">Email:</label>    			<input type="email" name="email" required>    			<br>    			<label for="mobile">Mobile:</label>    			<input type="tel" name="mobile">    			<br>    			<label for="address">Address:</label>    			<textarea name="address"></textarea>    			<br>    			<label for="contact">Method to contact you:</label>    			<input type="checkBox" name="contact">    			Email    			<input type="checkBox" name="contact">    			Whatsapp    			<input type="checkBox" name="contact">    			in-app chat    		</fIEldset>    		<input type="submit" name="submit">    	</form>
解决方法 从样式属性中删除此“冒号:”.

fIEldset : {

然后其他人会工作正常.

<!DOCTYPE HTML><HTML><head>	<Title>Dating Web Site</Title>	<style>		fIEldset {			background: lightyellow;			border: 10px solID yellow;			margin-bottom: 10px;			wIDth: 720px;		}		label {			wIDth: 180px;		}	</style></head><body>	<h1>Please Enter Your Details For Our Dating Website!</h1>	<form action="https://ihome.ust.hk/~rossiter/cgi-bin/show_everything.PHP" method="post">		<fIEldset>			<legend>Your Face</legend>			<label for="image">Your image:</label>			<input type="file" name="image" required>			<br>			Image prevIEw:			<img src="" ID="prevIEw">		</fIEldset>		<fIEldset>			<legend>Your General Details</legend>			<label for="name">name:</label>			<input type="text" name="name" required>			<br>			<label for="gender">Gender:</label>			<input type="radio" name="gender" required>			Male			<input type="radio" name="gender" required>			Female			<br>			<label for="age">Age:</label>			<input type="number" name="age" required>			<br>			<label for="dob">Date of birth:</label>			<input type="date" name="dob">			<br>			<label for="color">Favorite color:</label>			<input type="color" name="color">			<br>			<label for="country">Which country:</label>			<select name="country">				<option value="no"></option>				<option value="en">England</option>				<option value="in">India</option>				<option value="jp">Japan</option>				<option value="sp">Spain</option>				<option value="us">USA</option>			</select>		</fIEldset>		<fIEldset>			<legend>Your Indicators</legend>			<label for="height">Height:</label>			Short			<input type="range" name="height" min="0" max="100">			Tall			<br>			<label for="salary">Salary:</label>			Poor			<input type="range" name="salary" min="0" max="100">			Rich			<br>		</fIEldset>		<fIEldset>			<legend>Your Contact information</legend>			<label for="email">Email:</label>			<input type="email" name="email" required>			<br>			<label for="mobile">Mobile:</label>			<input type="tel" name="mobile">			<br>			<label for="address">Address:</label>			<textarea name="address"></textarea>			<br>			<label for="contact">Method to contact you:</label>			<input type="checkBox" name="contact">			Email			<input type="checkBox" name="contact">			Whatsapp			<input type="checkBox" name="contact">			in-app chat		</fIEldset>		<input type="submit" name="submit">	</form></body></HTML>
总结

以上是内存溢出为你收集整理的html – head元素中的CSS无效全部内容,希望文章能够帮你解决html – head元素中的CSS无效所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1045971.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-24
下一篇 2022-05-24

发表评论

登录后才能评论

评论列表(0条)

保存