正解:B
To meet the requirements:
For mobile devices, the content should display inthree rows.
For desktops and tablets, the content should display ina single row.
Explanation of Correct Option (B):The code useslightning:layoutItemwith appropriate sizing formediumDeviceSize="4", which ensures:
Mobile devices: Each layout item will occupy the full width (size="12"), resulting in three rows.
Tablets and desktops: Each layout item will occupy one-third of the row (mediumDeviceSize="4"), displaying in a single row.
Example Code from Option B:
<lightning:layoutmultipleRows="true">
<lightning:layoutItemsize="12"mediumDeviceSize="4">{!v.account.Name}</lightning:layoutItem>
<lightning:layoutItemsize="12"mediumDeviceSize="4">{!v.account.AccountNumber}</lightning:
layoutItem>
<lightning:layoutItemsize="12"mediumDeviceSize="4">{!v.account.Industry}</lightning:layoutItem>
</lightning:layout>
Option A:Does not account for mediumDeviceSize and will not adjust for tablets/desktops.
Option C:Uses incorrect sizing formediumDeviceSize, which may not display correctly for tablets/desktops.
Reference:Lightning Design System Grid