CSS/BEM:修订间差异
来自康健生活
| 第18行: | 第18行: | ||
.article--project {} // 文章修饰符 project 页面 | .article--project {} // 文章修饰符 project 页面 | ||
.article--about {} // 文章修饰符 about 页面</syntaxhighlight> | .article--about {} // 文章修饰符 about 页面</syntaxhighlight> | ||
<syntaxhighlight lang="html5"> | |||
<div class="c-card"> | |||
<div class="c-card__header"> | |||
<h2 class="c-card__title">Title text here</h2> | |||
</div> | |||
<div class="c-card__body"> | |||
<img class="c-card__img" src="some-img.png" alt="description"> | |||
<p class="c-card__text">Lorem ipsum dolor sit amet, consectetur</p> | |||
<p class="c-card__text">Adipiscing elit. | |||
<a href="/somelink.html" class="c-card__link">Pellentesque amet</a> | |||
</p> | |||
</div> | |||
</div></syntaxhighlight> | |||
{{Unknown|网上看到的一个示例,简单直观,我就不重复造轮子了,拿来即用,如有版权问题请务必联系我~}} | {{Unknown|网上看到的一个示例,简单直观,我就不重复造轮子了,拿来即用,如有版权问题请务必联系我~}} | ||