문제

In yesod, we can specify the class attribute like so:

<div .myclass> ==> <div class="myclass">

Is there an analog for id? For example, something like:

<div #id> ==> <div id="id">
도움이 되었습니까?

해결책

Yes; it has the exact syntax you guessed.

From the Yesod book:

There are two convenience attributes: for id, you can use the hash, and for classes, the period. In other words, <p #paragraphid .class1 .class2>.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top