CSS代码来控制字体大小 [英] CSS code to control font size
本文介绍了CSS代码来控制字体大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
请帮助我!
如何在CSS中控制字体大小.
Please help me!
How can we control the font size in CSS.
Thanks in advance!
推荐答案
好吧,我将使用font-size : 2em;
作为示例.你有什么问题?
修改示例:
Well I would usefont-size : 2em;
for instance. What are your issues?
Modified with example:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<style type="text/css">
div#myText {
font-size: 1.5em;
width : 200px;
height : 50px;
border: solid 5px green;
}
</style>
</head>
<body>
<div id="myText" style="width:1000px; height:400px; border: solid 5px green">
This is some text in a div tag
</div>
</body>
</html>
在html头部的style标签内查找font-size.
结束修改.观察CSS选择器div#myTxt
如何建立从CSS到div的链接.
问候,
曼弗雷德(Manfred)
Look for font-size inside the style tag in the head section of the html.
End modification. Observe how the link from CSS to the div is made by the CSS selector div#myTxt
.
Regards,
Manfred
#myText
{
字体大小:1.5em;
宽度:200像素;
高度:50像素;
边框:纯5像素绿色;
}
亲爱的朋友,您在这里写错了代码
对于任何html标记的ID,我们需要使用ID名称为#myText的代码.ok
不是div#myText.
好的..
#myText
{
font-size: 1.5em;
width : 200px;
height : 50px;
border: solid 5px green;
}
Dear friend u write a wrong code here
for id of any html tag we need to use #myText with its id name.ok
not div#myText.
ok..
这篇关于CSS代码来控制字体大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文