我想使用约束来解决下面的问题,但是实际上我不知道从哪里开始,所以我决定在这里发布它以寻求帮助。
*** Fitting squares ***
Given the set of black squares of Figure 1 (a 2x2, 3x3, 4x4 and a 5x5 square),
fit them all into the white rectangle of Figure 1 (a 7x9 rectangle), and this in
such a way that there is no overlap between the squares
我正在尝试创建一个模拟的聊天框,它需要在div的左侧和右侧弹出聊天。这些谈话中的每一个也都是div。我想不出如何将div附加到外部div的右侧。在我的代码中,我将一些文本附加到我想要添加到外部div的div中。如果可能的话,我想用香草Javascript来做这件事。
function pressEnter() {
if (event.keyCode === 13) {
event.preventDefault;
// get text
var text = document.getElementById("client_text_