PHP code example of penobit / css-flip
1. Go to this page and download the library: Download penobit/css-flip library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
penobit / css-flip example snippets
use Penobit\CSSFlip\CSSFlip;
$cssFlip = new CSSFlip();
$cssCode = <<<CSS
body{
direction: ltr;
}
div{
text-align:left;
margin-left: 20px;
margin-right: 2rem;
}
span{
padding: 10px 15px 20px 25px;
}
CSS;
$flippedCssCode = $cssFlip->transform($cssCode);
/*
# Output of above code will be
body{
direction: rtl;
}
div{
text-align:right;
margin-right: 20px;
margin-left: 2rem;
}
span{
padding: 10px 15px 20px 25px;
padding: 10px 25px 20px 15px;
}
*/