// JavaScript
Image1.onclick = function() {
NSB.MsgBox("clicked");
};
Image (Bootstrap): Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
| (One intermediate revision by the same user not shown) | |||
| Line 4: | Line 4: | ||
Images in Bootstrap can be made responsive-friendly using the ''responsive'' property. This applies max-width: 100%;, height: auto; and display: block; to the image so that it scales nicely to the parent element. | Images in Bootstrap can be made responsive-friendly using the ''responsive'' property. This applies max-width: 100%;, height: auto; and display: block; to the image so that it scales nicely to the parent element. | ||
Images can also be used as buttons by supplying an onclick function. | |||
[[Introduction_to_Bootstrap#Popovers_and_Tooltips|Popovers and Tooltips]] are supported. | [[Introduction_to_Bootstrap#Popovers_and_Tooltips|Popovers and Tooltips]] are supported. | ||
| Line 18: | Line 20: | ||
| shape || Thumbnail, rounded or circle? | | shape || Thumbnail, rounded or circle? | ||
|- | |- | ||
| src || | | src || Location of image. Do not add files to /nsb. Cannot be a URL. Can be a base64 data URI (e.g., data:image/png;base64,...). | ||
|} | |} | ||
Latest revision as of 20:56, 19 February 2026
Description
Images in Bootstrap can be made responsive-friendly using the responsive property. This applies max-width: 100%;, height: auto; and display: block; to the image so that it scales nicely to the parent element.
Images can also be used as buttons by supplying an onclick function.
Popovers and Tooltips are supported.
Properties and Methods
Standard properties are supported, plus:
| center | Should image be centered in container? |
| responsive | Should image resize to container? |
| shape | Thumbnail, rounded or circle? |
| src | Location of image. Do not add files to /nsb. Cannot be a URL. Can be a base64 data URI (e.g., data:image/png;base64,...). |
Events
Standard events are supported. For this control, the onclick event will be most useful.
Example
' Basic
Function Image1_onclick()
MsgBox "clicked!"
End Function
