Thymeleaf th:textappend不起作用

时间:2018-02-24 12:00:08

标签: html5 thymeleaf

我的Thymeleaf模板中有这段代码,但我没有看到我在标签末尾附加的“在线”文字。

*{
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    -webkit-font-smoothing: antialiased;
    text-align: center;
}

body, html, .container{
    height: 100%;
}

button:focus{
    outline: none;
}

.container{
    display: flex;
    flex-direction: column;
}

.headerBar{
    position: fixed;
    height: 56px;
    background-color: #94D04F;
    width: 100%;
    padding-left: 4px;
    padding-right: 4px;
    box-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid black;
    z-index: 0;
}


.button-raised{
    /* box-shadow: 0 0 2px rgba(0,0,0,.12), 0 2px 2px rgba(0,0,0,.2); */
    display: flex;
    justify-content: center;
    align-items: center;
    text-transform: uppercase;
    height: 30px;
    padding: 0 2px;
    background-color: transparent;
    color: #212121;
    border: none;
    font-weight: 400;
}

.button-raised:hover{
    /* background-color: white; */
    color: white;
    font-weight: 400;
    /* border: 1px solid #44d057; */
}

.button-raised:focus{
    outline: none;
}

.button-raised i{
    line-height: 1;
}

.button-raised span{
    line-height: 1;
    font-size: 16px;
}

#dateSpan{
    font-family: 'Open-Sans', sans-serif;
    font-size: 24px;
    font-weight: 500;
    color: #fff;
}


.footerBar{
    height: 56px;
    background-color: #94D04F;
    position: fixed;
    bottom: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4px;
    border-top: 1px solid black;
}

.button-raised--white{
    /* box-shadow: 0 0 2px rgba(0,0,0,.12), 0 2px 2px rgba(0,0,0,.2); */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-transform: uppercase;
    padding: 0 2px;
    background-color: transparent;
    color: #212121;
    border: none;
}

.button-raised--white:hover{
    color: white;
}

.button-raised--white span{
    font-size: 12px;
    font-weight: 400;
}

main{
    background-color: #f9f9f9;
    position: fixed;
    display: flex;
    flex-direction: column;
    top: 56px;
    bottom: 56px;
    width: 100%;
    z-index: -1;
}

.blocksCounter{
    width: 100%;
    height: 30px;
    padding: 0 8px;
    display: flex;
    justify-content:space-around;
    align-items: center;
    background-color: #bdbdbd52;
    color: #212121;
}

.blocksCounter span{
    font-size: 18px;
    font-weight: 500;
}

.studyBlockElement{
    margin-top: 4px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4px;
    width: 300px;
    height: 36px;
    position: relative;
    border: 1px solid black;
}

.studyBlockElement > i{
    position: absolute;
    left: 4px;
}

.current{
    background-color: #9DDC54;
}

.todo{
    background-color: #39501E;
    color: white;
}

.studyBlockElementRightButtons{
    position: absolute;
    right: 4px;
    display: flex;
}

#settingsModal{
    position: fixed;
    height: 100%;
    width: 100%;
    z-index: 3;
    background-color: #212121;
}

1 个答案:

答案 0 :(得分:0)

th:textappend不受支持,请参阅doc

  

标准中还有两个特定的附加属性   方言:th:classappend和th:styleappend属性

改为使用th:classappend="'online'"