This section explains components and capabilities that don't exist in the base Bootstrap framework but are added in FluentBootstrap.
You can create placeholder images generated by placehold.it with .Placeholder()
. This makes it easy to wireframe or build prototypes without having to worry about actual image assets. You must specify a width and by default the placeholder images are square, but you can also specify a height. As with all images you can specify alt text using .SetAlt()
, responsive behavior with .SetResponsive()
, and shape with .SetStyle()
.
@Html.Bootstrap().Placeholder(150) @Html.Bootstrap().Placeholder(150, 100) @Html.Bootstrap().Placeholder(150, 150).SetAlt("A Placeholder").SetStyle(ImageStyle.Circle)
You can change the format of a placeholder image with .SetFormat()
. This should be gif
, jpeg
, jpg
, or png
.
You can change the text of a placeholder image with .SetText()
.
@Html.Bootstrap().Placeholder(200, 100).SetText("My Image")
You can change both the text and background color of a placeholder image with .SetColors()
. The background color is specified first followed by the text color. The colors should be specified as a hex string (I.e., ffffff
is white).
@Html.Bootstrap().Placeholder(200, 100).SetColors("000080", "CCCCFF")
The best way to get help is to post a question on StackOverflow with the FluentBootstrap tag. If you find a bug, open an issue on GitHub. You can also tweet or follow @daveaglick with questions or for announcements.
FluentBootstrap is crafted by Dave Glick. Code on GitHub.