Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
A sample PDF template showing off the "border-radius" CSS Property
<?php
/**
* Template Name: Example Border Radius
* Version: 0.1
* Description: A sample PDF template showing off the "border-radius" CSS Property
* Author: Gravity PDF
* Group: Example
* License: GPLv2
* Required PDF Version: 4.0
*/
/* Prevent direct access to the template (always good to include this) */
if ( ! class_exists( 'GFForms' ) ) {
return;
}
?>
<style>
div {
margin: 5mm 0;
}
</style>
<!-- Standard Border Radius -->
<div style="border-radius: 5px; height: 30mm; background: grey;"></div>
<!-- Standard Border Radius with larger corners -->
<div style="border-radius: 20px; height: 30mm; background: grey;"></div>
<!-- Only round one corner on the container -->
<div style="border-top-left-radius: 60px; height: 30mm; background: grey;"></div>
<!-- Create a circle using percentages and a square container -->
<div style="border-radius: 50%; height: 40mm; width: 40mm; background: grey;"></div>
<!-- Control the horizontal and vertical corner radius -->
<div style="border-radius: 2em 1em 4em / 0.5em 3em; height: 40mm; width: 40mm; background: grey;"></div>
<!-- Border Radius with 2px border -->
<div style="border-radius: 10px; height: 30mm; border: 2px solid black;"></div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.