我是CSS的亵渎,我对此一无所知.我需要将HTML代码和CSS格式放在iPhone程序的相同字符串对象中.
我有HTML代码和CSS代码,但我不知道如何将它们混合在一起.你可以帮帮我吗?
HTML代码:
<html>
<head>
<link type="text/css" href="./exemple.css" rel="stylesheet" media="all" />
</head>
<body>
<p>
<span class="title">La super bonne</span>
<span class="author">proposée par Jérém</span>
</p>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
CSS样式:
.title {
color: blue;
text-decoration: bold;
text-size: 1em;
}
.author {
color: gray;
}
Run Code Online (Sandbox Code Playgroud)
Pri*_*ner 87
<html>
<head>
<style type="text/css">
.title {
color: blue;
text-decoration: bold;
text-size: 1em;
}
.author {
color: gray;
}
</style>
</head>
<body>
<p>
<span class="title">La super bonne</span>
<span class="author">proposée par Jérém</span>
</p>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
在一个侧面说明,这本来是太多容易只是做这个.
您可以在带有<style></style>
标签的html文档中包含CSS样式。
例:
<style>
.myClass { background: #f00; }
.myOtherClass { font-size: 12px; }
</style>
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
122764 次 |
最近记录: |