Home > Web Front-end > HTML Tutorial > CSS设置字体和边框颜色时Chrome和其他主流浏览器差别的问题_html/css_WEB-ITnose

CSS设置字体和边框颜色时Chrome和其他主流浏览器差别的问题_html/css_WEB-ITnose

WBOY
Release: 2016-06-21 09:35:50
Original
1161 people have browsed it

a.toregister:link {	text-decoration:none;	width:90px;	height:40px;	font-family:"黑体" ;	font-weight: bold;	border:1px solid #cccccc;	color:rgb(100,100,100);	background-color:#d1d2d3;	position:absolute;	left:1348px;	letter-spacing:3px;	top:20px;	text-align:center;	line-height:40px;	display:block;} a.toregister:hover {	color:rgb(68,68,68);		background-color:#d3d4d5;	border:1px solid #c6c6c5 ;}
Copy after login

以上为设置链接样式的代码,在各浏览器中显示的效果如图:
chrome链接前:
chrome链接后:
IE链接前:
IE链接后:
其他如FireFox、OP等浏览器显示效果都和IE一样。边框颜色变化不是很明显,但仔细看还是可以看出来变化的。chrome只有hover时是正常的,link状态下为什么边框是那样的颜色呢?百思不得其解,虚心向各位大侠赐教。谢谢


回复讨论(解决方案)

先设置一下a的样式,border:none;color:#ccc;方可解决,如果还是不行发站内邮箱

你没设置a.toregister:visited样式,Chrome下的显示效果看起来是默认的:visited样式。按link、visited、hover、active顺序进行设置试试看吧。

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template