![](https://i-blog.csdnimg.cn/blog_migrate/4e7ff0d3c4529c5be1d445add1dcc907.png)
wordpress添加媒体
Have you ever wondered how some WordPress sites have drop caps? Recently one of our users asked if we know of an easy way to add drop caps in WordPress. In this article, we will show you how to add drop caps in WordPress posts without writing any CSS code.
您是否想过某些WordPress网站有首字下沉吗? 最近,我们的一位用户问我们是否知道在WordPress中添加首字下沉的简单方法。 在本文中,我们将向您展示如何在WordPress帖子中添加首字下沉而无需编写任何CSS代码。
![Drop cap in float mode Drop cap in float mode](https://i-blog.csdnimg.cn/blog_migrate/817a75a104480ff3453f1adcafd69889.png)
Drop caps is a styling technique commonly used in print books and magazines featuring long reads. It uses a large font size for the first letter of the starting paragraph in each chapter.
首字下沉是一种定型技术,常用于印刷书籍和长期阅读的杂志。 在每个章节的开始段落的首字母中,它使用较大的字体。
影片教学 (Video Tutorial)
If you don’t like the video or need more instructions, then continue reading.
如果您不喜欢该视频或需要更多说明,请继续阅读。
First thing you need to do is install and activate the Simple Drop Cap plugin. Upon activation, simply visit Settings » Simple Drop Cap to configure the plugin.
您需要做的第一件事是安装并激活Simple Drop Cap插件。 激活后,只需访问设置»简单首字下沉即可配置插件。
![Simple Drop Cap Settings Simple Drop Cap Settings](https://i-blog.csdnimg.cn/blog_migrate/1b3cd2038e1f2febc79a270017eeb752.png)
The plugin comes with three styling options. The first one is normal mode. This is how the drop cap looks in the normal mode:
该插件带有三个样式选项。 第一个是普通模式。 这是在常规模式下首字下沉的外观:
![Example of a normal drop cap Example of a normal drop cap](https://i-blog.csdnimg.cn/blog_migrate/714477b66b846c2f9cad160e8bbfadd2.png)
The second choice is float mode. This is how the drop cap looks in the float mode:
第二个选择是浮动模式。 这是首字下沉在浮动模式下的外观:
![Drop cap in float mode Drop cap in float mode](https://i-blog.csdnimg.cn/blog_migrate/817a75a104480ff3453f1adcafd69889.png)
The last option is to use your own custom CSS rules. If you choose this option, then you will need to provide your own styling rules in the custom css style box
最后一个选择是使用您自己的自定义CSS规则。 如果选择此选项,则需要在自定义css样式框中提供自己的样式规则。
The plugin also allows you to change the color of drop capped letter.
该插件还允许您更改首写字母的颜色。
Lastly under the usage settings, check the box next to drop cap automation. This will automatically add drop cap to all your post.
最后,在使用设置下,选中首字下沉自动化旁边的框。 这将自动为您的所有帖子添加首字下沉。
Alternatively, you can also wrap the first letter of your posts with [dropcap][/dropcap] shortcode. We’d recommend using the automated method because it’s easy to use.
或者,您也可以使用[dropcap] [/ dropcap]简码包装帖子的首字母。 我们建议您使用自动方法,因为它易于使用。
That’s all. Save your settings and preview your site to see the plugin in action.
就这样。 保存设置并预览您的站点,以查看运行中的插件。
We hope this article helped you add drop caps in WordPress posts. You may also want to check out how to add custom styles to WordPress visual editor.
我们希望本文能帮助您在WordPress帖子中添加首字下沉。 您可能还想了解如何向WordPress可视编辑器中添加自定义样式 。
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Google+.
如果您喜欢这篇文章,请订阅我们的YouTube频道 WordPress视频教程。 您也可以在Twitter和Google+上找到我们。
翻译自: https://www.wpbeginner.com/plugins/how-to-add-drop-caps-in-wordpress-posts/
wordpress添加媒体