need to understand a css/php sentence

Can someone please break this line down for me.

<div class="container" class="<?php wpp_css('property::content', "property_content"); ?>" role="main">

Many thanks.


Explanation:

<div 

It's a div element

class="container"

with the CSS class container .

class="<?php wpp_css('property::content', "property_content"); ?>"

This is wrong! An element can have only one class attribute! But it seems that you try to add custom CSS classes with the PHP function wpp_css .

role="main">

Your div has the attribute role with value main . More info about roles here.

Corrected div:

<div class="container <?php wpp_css('property::content', "property_content"); ?>" role="main">

wpp_css is a function, first parameter is 'property::content' second parameter is "property_content"

i think it is used to pass the right content to the container


You create a div with a dynamic class. The class is being generated ny a PHP function called wpp_css and the div's role is main

链接地址: http://www.djcxy.com/p/36630.html

上一篇: TWEET组合文本框如何工作?

下一篇: 需要了解一个css / php语句