Di Bernardo kicked four penalties and also converted an early try from Alessandro Zanni and also missed several other kicks which would have made his side's victory more emphatic.
Cardiff had gone ahead with Ceri Sweeney's early penalty and retook the lead when he converted Dafydd Hewitt's try but from then on the home side dominated the first half.
Lou Reed's try early in the second half was converted by Sweeney but the visitors' only other score was a penalty by fly half Sweeney.
Rain started falling just before kick-off and, after taking the lead with Sweeney's penalty after 12 minutes, the Blues were behind a minute later when Zanni's converted try put the home side on top.
Hewitt's try on the half hour, converted by Sweeney, put Cardiff 10-7 in front but five minutes later Di Bernardo's penalty made it 10-10.
Another Di Bernardo penalty just before the break put the home side 13-10 ahead at half-time.
Reed's try nine minutes into the second half, with Sweeney adding the extras, put the Blues 17-13 ahead.
Di Bernardo missed a penalty but then converted a penalty try as the home side went 20-17 in front.
Mike Paterson had been shown a yellow card for coming in from the side of a ruck and Treviso forced a penalty try as the visitors twice infringed in the scrum.
Fly half Di Bernardo went on to kick two more penalties, with a missed attempt in between, as the home side took the honours 26-17.