builder.CreateElement(0, "div", "content", new { @class="sub-title" });
<div class="sub-title">content</div>
builder.CreateComponent<Component>(0, attributes: new { Active = true, style = "display:flex" });
builder.CreateStyleRegion(selector => {
selector.AddStyle(".head", new {
font_size = "16px",
color = "#ff0000",
font_weight = "bolder"
})
.AddStyle(".bigger", new { animation = "tran 3s" });
.AddKeyFrames("tran", frame =>
{
frame.Add("from", new { width = "0px" })
.Add("to", new { width = "100px" });
});
})
.head {
font-size : "16px";
color : "#ff0000";
font-weight : "bolder";
}
.bigger {
animation : tran 3s;
}
@keyframes tran {
from {
width : "0px"
},
to {
width : "100px"
}
}
builder.Open("div").Class("sub-title").Content("content").Close();
<div class="sub-title">content</div>
using(var div = builder.Open("div").Class("sub-title"))
{
div.Content(inner =>
{
inner.Open<NavLink>().Content("Link").Close();
});
}