为什么fieldset在wordpress中不起作用?

时间:2017-08-06 12:16:04

标签: css wordpress

有人建议我使用字段集,但它不起作用,

这是代码

.block{
 display: inline-block;
 border: 2px solid white;
 }
.title2{
 color: white;
 font-size: 1.5em;
 text-align: center;
}

<fieldset class="block">
        <legend class="title2">
                Services
        </legend>
 </fieldset>

它显示如下

enter image description here

我想是这样的

enter image description here

这是下划线

enter image description here

1 个答案:

答案 0 :(得分:1)

试试这段代码:

由于您的主题可以覆盖viewHolder.mLOL.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { LOLCounter = new Firebase("add your Firebase DB link"); Firebase DatabaseLOLCounter = LOLCounter.child("LOL"); DatabaseLOLCounter.runTransaction(new Transaction.Handler() { @Override public Transaction.Result doTransaction(final MutableData currentData) { if (currentData.getValue() == null) { currentData.setValue(1); } else { currentData.setValue((Long) currentData.getValue() + 1); } return Transaction.success(currentData); } @Override public void onComplete(FirebaseError firebaseError, boolean committed, DataSnapshot currentData) { if (firebaseError != null) { Log.d("Firebase counter increment failed."); } else { Log.d("Firebase counter increment succeeded."); } } }); } 样式,因此您只需使用fieldset即可修复。

!important
fieldset.block {
    font-family: sans-serif!important;
    border: 5px solid #1F497D!important;
    background: #eee!important;
    border-radius: 5px!important;
    padding: 15px!important;
}
fieldset.block legend.title2 {
    background: #1F497D!important;
    color: #fff!important;
    padding: 5px 10px!important;
    font-size: 32px!important;
    border-radius: 5px!important;
    box-shadow: 0 0 0 5px #ddd!important;
    margin-left: 20px!important;
}