0

我页面上的标题一直以斜体显示,我找不到任何代码表明它应该这样做。会发生什么?我什至从另一个页面复制/粘贴了标题代码,其中标题没有斜体,但它仍然存在。

    <head>
<title>1867 Settlement - Origins</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
    background-color: #E6E6FA;
}
.style2 {
    font-size: small;
    font-style: italic;
}
.style3 {font-size: small}
a:link {
    color: #B2243B;
}
a:visited {
    color: #B2243B;
}
-->
</style>
</head>
4

1 回答 1

0

如果您想使用 content 属性很容易地设置 title 属性的样式

a[title]:hover:after {
 content: attr(title);
 padding: 4px 8px;
 color: #333;
 position: absolute;
 left: 0;
 top: 100%;
 z-index: 20;
 white-space: nowrap;
 -moz-border-radius: 5px;
 -webkit-border-radius: 5px;
 border-radius: 5px;
 -moz-box-shadow: 0px 0px 4px #222;
 -webkit-box-shadow: 0px 0px 4px #222;
 box-shadow: 0px 0px 4px #222;
 background-image: -moz-linear-gradient(top, #eeeeee, #cccccc);
 background-image: -webkit-gradient(linear,left top,left    bottom,color-stop(0, #eeeeee),color-stop(1, #cccccc));
 background-image: -webkit-linear-gradient(top, #eeeeee, #cccccc);
 background-image: -moz-linear-gradient(top, #eeeeee, #cccccc);
 background-image: -ms-linear-gradient(top, #eeeeee, #cccccc);
 background-image: -o-linear-gradient(top, #eeeeee, #cccccc);
  }

演示http://jsfiddle.net/tDQWN/

于 2016-11-03T00:07:54.177 回答