? RER ? MER ??? ?
? ????? RER(? ?? ??? ???? ??) ? MER(?? ??? ?? ??) ???? ??? ????? ???? ??? ? ??? ??, ?? ??? ?????. ??? ?????? ?? ???? ?????.
? ? ?? ??? ???? ???? ???? ??, ?? ??, ?? ??? ???? ???? ??? ???? ??? ? ????. ???? ?? ??? ?????(RER)? ?? ??? ?? ??? ???(MER)? ?? ? ?? ?? ??? ?????.
HTML ?? ??
???:
<meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content="計(jì)算您狗狗的靜息能量需求 (RER) 和維持能量需求 (MER)..."> <meta name="keywords" content="狗狗 RER 計(jì)算器,狗狗 MER 計(jì)算器,狗狗營(yíng)養(yǎng),寵物卡路里計(jì)算器,靜息能量需求,維持能量需求"> <meta name="author" content="您的網(wǎng)站名稱"> <title>狗狗 RER 和 MER 計(jì)算器</title>
- ??? ?? HTML5 ??? ?????.
<meta>
??? SEO? ?? ???? ???? ??? ?????. <title>
??? ?? ??? ????? ???? ??? ???? ? ??? ???.
?? ??:
<label for="weight"> 狗狗體重 (公斤): <input type="number" id="weight" required> </label>
- ???? ?? ?? ??? ??? ???? ?? ?? ?????.
- `required` ??? ???? ???? ?? ?? ??? ??? ???.
CSS ????? ??? ????
??? CSS? ???? ???? ???? ???? ?? ?? ???? ??? ???? ???. ??? CSS ??? ??? ????.
body.rer-body { font-family: 'Arial', sans-serif; margin: 0; padding: 20px; background-color: #f9f9f9; box-sizing: border-box; }
- ??? ?? ???, ??? ?? ??, ?? ?? ??? ??? ?????.
- ??? ????? ??? ???? ??? ??? ?? ???? ?????.
?????? ?? ???
?? ??? ??? ????. ? ????? ??? ?? ??? ???? ??? ???? ?????.
function calculateRER() { const weight = parseFloat(document.getElementById('weight').value); const age = document.getElementById('age').value; const activity = document.getElementById('activity').value; if (isNaN(weight) || weight <= 0) { alert('請(qǐng)輸入有效的體重!'); return; } let rer = 70 * Math.pow(weight, 0.75); let mer = rer; // 根據(jù)生命階段和活動(dòng)水平調(diào)整 MER if (age === 'puppy') { mer *= 2; // 幼犬乘以2 } else if (age === 'senior') { mer *= 1.2; // 老年犬乘以1.2 } if (activity === 'high') { mer *= 1.6; // 高活動(dòng)量乘以1.6 } else if (activity === 'moderate') { mer *= 1.4; // 中等活動(dòng)量乘以1.4 } const resultDiv = document.getElementById('rer-result'); resultDiv.innerHTML = ` <p><strong>狗狗體重:</strong> ${weight} kg</p> <p><strong>生命階段:</strong> ${age}</p> <p><strong>活動(dòng)水平:</strong> ${activity}</p> <p><strong>靜息能量需求 (RER):</strong> ${rer.toFixed(2)} kcal/天</p> <p><strong>維持能量需求 (MER):</strong> ${mer} kcal/天</p> `; resultDiv.style.display = 'block'; }
?? ??:
- HTML ???? ?? ?(??, ?? ??, ?? ??)? ???? ??? ?????.
- ???? ???? ?????(`isNaN(weight)`? ??? ???? `weight > 0`?? ?????).
- ?? ??? ?????(RER) 70 * ??^0.75 ??? ???? ?????.
- ??? ??? ???? ?? ??(???, ??, ??) ? ?? ??(??, ??, ??)? ?? ?? ??? ???(MER)? ?????.
- ????? `rer-result` div? ??? ???? ?????.
?? ????
??? ???? ????? ??? ???? ? ????. ?? ?? ??? ???? ?? ?? ???? ????? ??? ? ?? ?? ?????.
? ??? ??? ??? ? ????
??? ???? ??? ???! ??? ??? ? ?? ? ?? ??? ??? ????.
- ?? ??? ?? ?? : ?? ??? ???? ??? ?????? ???? ????? ??? ?? ???? ?????.
- ?? ??: ???? ??? ??? ??? ?? ?? ??? ?? ??? ??? ? ????.
- ??? ??? ??: ???? ?? ??(?: ??? ??)? ? ? ??? ?????.
- ?? ??: ? ??? ??? ?? ???? ?? ??? ?? ?? ??? ?????.
?? ??? ??? ?? ?? ??? ?????! ?
??? ?? ??? ??? ??? ???? ???? ???? ? ??? ? ? ????. ??? ?????! ?
? ??? ? RER ? MER ???? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

CSS?? ????? ??? ? ?? ??? ????. 1. HTML ? CSS? ?? ??? ?????? ???? ?? ???? ?? ???? ??????. 2. ?? ??? ??? ?? ???? ???? ?? ?? ??? ?? ?? ??? ??????. 3. ??? ????? ???? JavaScript? ?? ???? ?????? ??? ?????. ? ?? ??? ??? ??? ????? ?? ??, ??, ??? ? ?? ???? ?? ?? ?? ??? ???? ?????.

CSS ???? ??? ? ??? ??? ????? ???? ??? ???? ???? ?? ?? ???? ????? ???????. 1. Flexbox ? ??? ??? ?? ???? ??? ??, ?? : ??? ?? ? ????? ??? ????. 2. Caniuse ?? ?? ?? ??? ??????. 3. -webkit-, -moz-, -ms-, -o- ? ?? ???? ???? ???? ?????. 4. AutoPrefixer? ???? ???? ???? ???? ?? ????. 5. ?? ????? ????? PostCSS? ???? BrowsersList? ??????. 6. ?? ? ???? ???? ?????. 7. Modernizr ?? ??? ??? ????? ??? ? ????. 8. ?? ????? ???? ?? ? ??? ????.

themaindifferencesbetweendisplay : ???, ??, andinline-blockinhtml/cssarelayoutbehavior, spaceusage ? stylingcontrol.1.inlineElementsFlowWithText, do n'tStartonnewlines, ingorewidth/height, andonlyapplyhorizontalpadding/margins —IdealforIneTeTexting

CSS? ?? ?? ??? ??? ??? ???? ???? SVG? ???? ?? ???, ?? ????, ??? ?? ?? ??? ?? ???? ??????. ??? ??? ????. 1. ?, ??, ??? ?? ?? ??? ?? ??? ?????. 2. ?? ?? ? ??? ???? ??? ? ????. 3. ?????? ?? ?? ?? ?? ????? ???? ?? ??? ?? ? ? ????. 4. ???? ???? ??? ??? ??? ????? ?? ? ??? ????. ???? ???? ?? ?? ?? : ? (50pxatcenter) ? ??? ?? ?? : ??? (50%0%, 100 0%, 0%)? ?? ????. ????

??? ?? ???? ???? ??? ??, ?? ??? ??? ? ? ????? ??? ??? ???? ???? ? ? ?? ? ? ????. 1. CSS ?? : ?? ??? ???? ???? ?? ??; 2. ????? ?? ?? ?? ???? ?? ?? ??? ??? ? ????. 3. ?? ??? ??? ??? ??? ?? ?? ???? ????????. 4. ??? ????? ??? ???? ?? ? ??? ??? ?? ??? ?? ?? ??? ????? ???? ?? ????.

CSS? ???? ?? ? ???? ???? ??? ?? ??? ?? ?? ?? ? ? ????. 1. Max width : 100% ? ?? : Auto? ???? ???? ??? ????? ???? ??? ??? ? ??????. 2. HTML? SRCSET ? ?? ??? ???? ?? ??? ??? ??? ??? ???????????. 3. ?? ?? ? ?? ??? ???? ??? ??? ? ?? ?????? ??????. ? ??? ?? ???? ?? ???? ???? ???? ????????.

CSS ??? ??? ?? ?? ?? ? ?? ? ?? ??? ?? ????. 1.px? ?? ??? ????? ?? ??? ??? ?? ??? ?????. 2.EM? ?? ????, ?? ?? ??? ??? ?? ?? ???? ??, REM? ?? ??? ???? ? ????? ??? ????? ?????. 3.VW/VH? ?? ? ???? ??? ??? ??? ??????? ?? ???? ?????? ???????. 4. ??? ?? ?? ? ??, ?? ?? ?? ? ??? ???? ???? ???????. ???? ??? ???? ??? ? ?? ??? ???? ? ????.

?? ????? CSS ?? ??? ????? ?? ?? ??? ??, ?? ?? ?? ??, Flexbox ? ??? ???? ?? ?? ? ?? CSS ??? ????? ??? ???? ???? ?? ????? ??? ?????. 1. ?? ??? ??? ???? ????. ???? CSSRESET ?? NALLER.CSS? ???? ?? ???? ???? ????. 2. IE? ?? ??? ?? ?? ?? ??? ????. ?? ?? : ?? ? ???? ??? ??? ???? ?? ????. 3. Flexbox ? Grid? Edge Case ?? Old ???? ??? ?????. ? ?? ??? ? AutopRefixer ??; 4. ?? CSS ?? ??? ???? ????. Caniuse? ???? ?? ?????????.
