
Each corner could be set explicitly like so: Last, the border-radius are set to 10px to give rounded corners. This ensures that the shadow is centered and fully contained in the HtmlText item.
ADD SHADOW TO IMAGE BLOCS APP PLUS
They each have offsets of their own: twice the margin for the width and twice the margin plus one pixel for the height. The width and height are dynamically set so that they will adjust with the width and height of the whole object. This keeps the shadow from exceeding the boundaries of the HtmlText and thus cutting the shadow off. Next, the margin is set to be twice the largest offset or blur radius, whichever is greater. We layer multiples of these box-shadows by adding multiple sets, separating each with a comma and ending with a semicolon. There are more elements that could be added, which you can explore here, but for this article we will stick with these four. First, the box-shadow is comprised of four elements: the horizontal shadow offset, the vertical shadow offset, the blur radius, and the color (in that order). Please note that in these pictures my background color is set to RGBA(240, 240, 240, 1). In the HtmlText property, copy and paste the following: So how can we transpose this technique into Power Apps? Let's start by inserting an HTML Text element, named HtmlText1, into an app with a Height of 216, a Width of 217, and PaddingTop, PaddingRight, PaddingBottom, PaddingBottom all set to 0. The basic premise is to add multiple box-shadow elements with increasing offsets and blurs and, optionally, varying the alpha channel of the color to stylize the shadow. I recently stumbled upon an article by designer and consultant Tobias Ahlin Bjerrome on adding layered shadows to html elements to give a much nicer look than I had seen before. As a citizen developer, I am constantly looking for ways to skill up my app making and design game.
