java开发 如何拓展深度和宽度,产品尺寸:宽度,高度和深度

I'm using schema.org definition to represent a product.

I have a doubt about product size: should I specify the unit of measure in the field?

Here's my code (I need a separate span for "cm" to style it differently):

Product name

Size:

60 cm

50 cm

40 cm

Is this the correct way to define the size?

解决方案

If you want to use Distance:

As the Distance type does not seem to define a suitable property to provide the actual value, and its description says that values have

[…] the form ''. E.g., '7 ft'.

I assume that the type should not be provided explicitly, e.g.:

60 cm

If the type should be provided, I guess using name is the only option:

60 cm

If you want to use QuantitativeValue:

60

cm

Instead of specifying the UN/CEFACT code for "cm" (= CMT) in a meta element (which is allowed in the body, if you use it for Microdata), you could also use the data element:

60

cm

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值