wordpress文本框_如何使文本小部件在WordPress中更加丰富多彩和减少乏味

wordpress文本框

Text widgets allow you to add extra information to your blog’s sidebar or any other widget area. Mostly people use text widgets in WordPress to add a little introduction about themselves, the website, or they use it to add shortcodes inside widgets. Text widgets are usually very dull looking and boring because they blend in with the other sidebar element. In this quick article, we will show you how to make text widgets more colorful and interesting. The goal is to make them prominent in the sidebar, so your visitors pay more attention to it.

文本小部件允许您向博客的侧边栏或任何其他小部件区域添加其他信息。 通常,人们使用WordPress中的文本小部件来添加一些关于他们自己,网站的介绍,或者使用它在小部件内添加短代码 。 文本小部件通常看起来非常乏味和无聊,因为它们与其他侧边栏元素融合在一起。 在这篇快速文章中,我们将向您展示如何使文本小部件更加丰富多彩和有趣。 目的是使它们在侧边栏中突出显示,以便您的访问者更加注意它。

colorful blue text widget

First thing you need to do is install and activate the Colorful Text Widget plugin. Upon activation, go to Appearance » Widgets. There you will see Colorful Text Widget in the available widgets panel. Drag and drop Colorful Text Widget to your sidebar (aka widget area).

您需要做的第一件事是安装并激活Colorful Text Widget插件。 激活后,转到外观»小部件 。 在那里,您将在可用的小部件面板中看到“彩色文本小部件”。 将“彩色文本”窗口小部件拖放到侧栏(即窗口小部件区域)。

Colorful text widget options

The widget settings are really simple. You would use it like any other text widget. The only extra thing you have to do is add the widget style in the last option. The widget comes with a few built in styles of some basic colors. Copy the color style you want to use and paste it. You can also create your styles in style.css file of your theme.

小部件设置非常简单。 您将像使用其他任何文本小部件一样使用它。 您唯一需要做的就是在最后一个选项中添加小部件样式。 该小部件带有一些内置的一些基本颜色的样式。 复制您要使用的颜色样式并将其粘贴。 您也可以在主题的style.css文件中创建样式。

If you don’t know CSS and just want to add a custom color, then there is an easier way to do that. Just copy and paste the following in your theme’s style.css:

如果您不了解CSS,而只想添加自定义颜色,那么可以使用一种更简单的方法。 只需将以下内容复制并粘贴到主题的style.css中:



//** Replace background-color and border with your own values **//

.ctw-custom {

background-color: #cccccc;
border: 1px solid #1b1b1b;
border-radius:10px;
-moz-border-radius:10px;
-webkit-border-radius:10px;
-o-border-radius:10px;
margin: 0 0 25px;
overflow: hidden;
padding: 20px;
color: #000;	

}


Now to use this style in your widget use .ctw-custom in the Colorful Text Widget’s widget style option. You can create multiple custom styles of your own. Just copy the css, rename .ctw-custom to something else and change the background-color and border values. We hope this quick tip will help you make text widgets more fun and prominent.

现在,要在窗口小部件中使用此样式,请在“彩色文本”窗口小部件的窗口小部件样式选项中使用.ctw-custom。 您可以创建自己的多种自定义样式。 只需复制CSS,将.ctw-custom重命名为其他名称,然后更改背景色和边框值。 我们希望该快速提示将帮助您使文本小部件变得更加有趣和突出。

翻译自: https://www.wpbeginner.com/plugins/text-widgets-colorful-wordpress/

wordpress文本框

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值