简体   繁体   English

如何更改在typo3 8.7 中创建的表单的字体?

[英]How to change the font of a form created in typo3 8.7?

Im absolutely new to typo3 and want to set up a simple contact form.我是typo3 的新手,想建立一个简单的联系表格。 So I created a form and added it to the page.所以我创建了一个表单并将其添加到页面中。 My template record looks like this:我的模板记录如下所示:

page = PAGE
page.typeNum = 0
page.10 < styles.content.get
page.includeCSS {
  file1 = fileadmin/templates/css/style.css
}

I can see the form and it works appropriately, but unfortunately my css doesnt do anything.我可以看到表单并且它可以正常工作,但不幸的是我的 css 没有做任何事情。

My style.css looks like this:我的 style.css 看起来像这样:

p {
    font-family: arial;
    font-size: 120px;
}

Gotta admit i have no knowledge about CSS too.不得不承认我对 CSS 也一无所知。 The changes I made had absolutely no impact on my page.我所做的更改对我的页面绝对没有影响。 Do these infos help you by any chance?这些信息对您有帮助吗? I just have no idea how to fix it on my own, been searching for a solution all day long.我只是不知道如何自己解决它,整天都在寻找解决方案。

you should learn more about the structure of CSS-files.你应该了解更多关于 CSS 文件结构的信息。 maybe you inspect some with your browser from other sites.也许您使用其他站点的浏览器检查了一些。

Then you will notice it is something like:然后你会注意到它是这样的:

p {
    font-family: arial; 
}

For file pathes in typoscript or objects and attributes: don't insert spaces:对于排版或对象和属性中的文件路径:不要插入空格:

:
page.10 < styles.content.get
page.includeCSS {
    file1 = fileadmin/templates/css/style.css
}

Your style.css should only contain this:你的style.css应该只包含这个:

p {
  font-family: arial;
  font-size: 120px;
}

... and you'll see the difference ;) ...你会看到不同之处;)

Probably only a copy&paste error, but your TypoScript (aka template record) has spaces where it shouldn't:可能只是复制和粘贴错误,但您的 TypoScript(又名模板记录)有不应有的空格:

...
file1 = fileadmin/templates/css/style.css
...

120px will result in a really big font ;-) 120px 会产生非常大的字体 ;-)

Set the style-definition to the body-tag (so for all elements below the body), not only for the p.将 style-definition 设置为 body-tag(对于身体下方的所有元素),而不仅仅是 p。

body {
  font-family: Arial, sans-serif;
  font-size: 12px;
}

You should define the styling of the input fields seperately.您应该单独定义输入字段的样式。 With some browsers the inheritance from the body tag definitions seem not to work.对于某些浏览器,从 body 标记定义继承似乎不起作用。

input, textarea { font-size:1.25em;输入,textarea { 字体大小:1.25em; font-family:serif;字体系列:衬线; border:1px solid darkgray;边框:1px 纯深灰色; } }

Something like that.类似的东西。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM