twitter-bootstrap – twitter示例中的“示例”标题

在twitter bootstrap上有一些功能的例子,这些例子包含在带有’bs-docs-example’类的DIV中.
每个这样的DIV都在左上角写有字符串’Example’.我想知道来自哪个字符串,以及我是否可以使用/自定义它?

解决方法

如果您 take a look at the Github for Bootstrap,您将看到.bs-docs-example有内容:“示例”设置为:: after(有关 how to manage content with CSS3 see here的说明).

基本上,.bs-docs-example附加了这种风格:

.bs-docs-example::after
{
    content: "Example";
    position: absolute;
    top: -1px;
    left: -1px;
    padding: 3px 7px;
    font-size: 12px;
    font-weight: bold;
    background-color: whiteSmoke;
    border: 1px solid #DDD;
    color: #9DA0A4;
    -webkit-border-radius: 4px 0 4px 0;
    -moz-border-radius: 4px 0 4px 0;
    border-radius: 4px 0 4px 0;
}

如果您修改内容成员,您将修改文本.

相关文章

前端工程师一般用的是Bootstrap的框架而不是样式,样式一般自...
起步导入:<linkrel="stylesheet"href="b...
(1)modal声明一个模态框(2)modal-dialog定义模态框尺寸(...
图片在Bootstrap版本3中,通过为图片添加 .img-responsive ...
<inputtype="text"class="form-controlda...
目录bootstrap-treeview使用小记零、写在前面的话一、功能说...