我有一个 div,比如说 3 行文本。我想将该 div 拆分为两个,假设我有 150 个字符,我想将它拆分,这样我最终会得到两个相等的部分。
所以让我再解释一下:
下面是一个文本节点......它在stackoverflow所见即所得容器中有6行:
<p>Brown the roast on all sides in a large lightly oiled skillet over high heat, before
adding to the slow cooker. While meat is browning. Prepare vegetables by washing and paring
potatoes, carrots, and parsnips. Cut into pieces, approximately 2 inches (5 cm) in length.
Place in the bottom, and up the sides, of a slow cooker. Add onions, and place pot roast on
top. Combine cranberry sauce, orange juice, rind and cinnamon and pour over the meat. Cover
and cook on low for 8-10 hours. Yield: 6 servings.</p>
假设我想将该 div 拆分为两个 52 像素的 div(根据我的浏览器,它的高度为 104 像素)。但我想这样做,所以这并不意味着措辞,这意味着我不想Cut
分成两个词,例如,C
在一个 div 和ut
另一个 div 中。
所以我最终会得到类似的东西
第 1 部分
<p>Brown the roast on all sides in a large lightly oiled skillet over high heat, before
adding to the slow cooker. While meat is browning. Prepare vegetables by washing and paring
potatoes, carrots, and parsnips. Cut into pieces, approximately 2 inches (5 cm) in length. </p>
第 2 部分
<p>Place in the bottom, and up the sides, of a slow cooker. Add onions, and place pot roast on
top. Combine cranberry sauce, orange juice, rind and cinnamon and pour over the meat. Cover
and cook on low for 8-10 hours. Yield: 6 servings.</p>
有没有办法做到这一点?