Shows how to use xtd::web::css:css_writer class.
#include <xtd/web/css/css_writer>
#include <xtd/console>
#include <strstream>
using namespace xtd::web::css;
auto main() -> int {
auto stream = std::stringstream {};
writer.selectors()[".user_box"].properties()["display"] = property::from("none");
writer.selectors()[".user_box"].properties()["position"] = property::from("fixed");
writer.selectors()[".user_box"].properties()["z-index"] = property::from(100);
writer.selectors()[".user_box"].properties()["width"] = property::from("100%");
writer.selectors()[".user_box"].properties()["height"] = property::from("100%");
writer.selectors()[".user_box"].properties()["left"] = property::from(300);
writer.selectors()[".user_box"].properties()["top"] = property::from(200);
writer.selectors()[".user_box"].properties()["background"] = property::from("#4080FA");
writer.selectors()[".user_box"].properties()["filter"] = property::from("alpha(opacity=40)");
writer.selectors()[".user_box"].properties()["opacity"] = property::from(0.4);
writer.write();
console::write_line("String stream :");
console::write_line("---------------");
console::write_line(stream.str());
}
Definition css_writer.h:15
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10