css 如何在HTML中定位文本并调整其大小?

inn6fuwd  于 2022-11-26  发布在  其他
关注(0)|答案(3)|浏览(156)

我正在做一个网站,但是由于一些奇怪的原因,我不能移动或调整文本的大小。我不想使用CSS,因为它对我来说真的很难理解。
这里有一个我在图片中所谈论的例子:

tzcvj98z

tzcvj98z1#

CSS是前端开发中非常重要的一部分,所以你不应该害怕使用和学习它。你可以开始把你的css链接到你的html,如下所示:

<head>
  <link rel="stylesheet" href="myfile.css">
  <!-- Or specify the directory C:/User/... 
but it's more efficient if you only specify the file created into a folder so if you move that folder changes will apply along with the html-->
</head>

然后打开created css并使用以下规则:(Only {}

Resizing Text:

p(or the part of html that you are using){
   font-size: 40px;
}

Move Text : 
(Consider that you are moving the object FROM the direction
to the opposite one: 
example left:80px means that it will be 80px away from the left side.

p{
   position:absolute; 
   left:80px; 
   top:20px;
}
k10s72fa

k10s72fa2#

我知道三种更改文本大小的方法,它们是:使用css或使用Head标签内的Style标签或使用所需used标签内的Style标签进行更改,例如:

<p Style="font-size:10px;">hello</p>
ct3nt3jp

ct3nt3jp3#

使用字体标记

<font size="3">I want the size to be small.</font>

相关问题