1

I read the following post but that does not seem to answer my question. In one of the tutorials that I am following I came across this

<div class=row [class.selected]=true>
</div>

Now I noticed the .selected class declaration in the css show below

.selected {
 border-right : 5px solid #EEE;
 border-bottom : 5px solid #EEE;
}

Now my question is what does the following code do ?

 <div class=row [class.selected]=true>
    </div>

Does it replace "row" with "selected" ? What exactly happens to the html/style with this ?

4

1 回答 1

1

它产生

<div class="row selected">
</div>

而这段代码

<div class=row [class.selected]=false>
</div>

会导致

<div class="row">
</div>
于 2017-01-10T06:39:19.080 回答