2015-07-21 110 views
4

如何链接

.project-link { 
 
font-family:Arial; 
 
display:inline-block; 
 
color:#FFF; 
 
font-size:5vw; 
 
white-space:nowrap; 
 
text-decoration:underline; 
 
margin-right: 3%; 
 
line-height:120%; 
 
} 
 
body { 
 
    background-color: black; 
 
}
<a class="project-link" id="one" href="#modal1">Maru Speaker Design <sup> (1) </sup> </a> 
 
<

我试图获得(1)要标上标表示。

编辑https://jsfiddle.net/v1jn1nus/

加入PIC Arial字体。

我只是不明白。它的工作原理在小提琴太...该元素的

enter image description here

enter image description here

+3

我没有改变你的代码时,我加入了代码片段。当我运行它时,'(1)'是被上限的。你有任何冲突的CSS附加? –

+0

当我运行您的代码段时,这似乎对我有用。什么不适合你? –

+0

呵呵。我使用随附的css更新了OP。 – user2252219

回答

5

这是vertical-align:super;所以检查,如果你的风格不复位垂直对齐。

检查:

.project-link { 
 
font-family:Arial; 
 
display:inline-block; 
 
color:#FFF; 
 
font-size:5vw; 
 
white-space:nowrap; 
 
text-decoration:underline; 
 
margin-right: 3%; 
 
line-height:120%; 
 
} 
 

 
.project-link > span { vertical-align:super; } 
 

 
body { 
 
    background-color: black; 
 
}
<a class="project-link" id="one" href="#modal1">Maru Speaker Design <span> (1) </span> </a> 
 
<

+0

很酷,谢谢。这工作。 :) – user2252219