HTML DOM content లక్షణం
నిర్వచనం మరియు వినియోగం
content లక్షణం ఒక పద్ధతిలో వచనం లేదా చిత్రం మరొక పద్ధతిలో ప్రదర్శించేటట్లుగా అమర్చు.
విధానం:
Object.style.content=value
సాధ్యమైన విలువలు
విలువ | వివరణ |
---|---|
string | పదబద్ధం నిర్వచించు. |
url | అనురూపం నిర్వచించు. |
|
|
attr(X) | ఈ ఎంపికకు ముందు లేదా తర్వాత ప్రదర్శించే ఎంపికల లక్షణాలను నిర్వచించు. |
open-quote | |
close-quote | |
no-open-quote | |
no-close-quote |
సూచనలు మరియు పరిశీలనలు
పరిశీలన:ఫ్లౌటింగ్ అంశాలకు ఒక పద్ధతిలో స్థానం తక్కువగా ఉంటే, ఆ అంశం తదుపరి పద్ధతిలో ఉండాలి, ఆ పద్ధతిలో స్థానం తక్కువగా ఉండాలి.
పరిశీలన:లోపలి అంశాల విషయంలో వెలుపలి అంశాలు ఫ్లౌటింగ్ అంశాల ముందు ఉండాలి. బ్లాక్ అంశాల వెలుపలి అంశాలు ఫ్లౌటింగ్ అంశాల తర్వాత ఉండాలి, కానీ బ్లాక్ అంశాల వెలుపలి అంశాలు ఫ్లౌటింగ్ అంశాల ముందు ఉండాలి.
ఉదాహరణ
ఈ ఉదాహరణలో చిత్రాన్ని ఎడమ వైపు ఫ్లోలో పెట్టండి:
<html>
<head>
<script type="text/javascript">
function setFloatLeft()
{
document.getElementById("img1").style.cssFloat="left";
}
</script>
</head>
<body>
<img id="img1" src="logocss.gif" width="95" height="84" />
<p>This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.</p>
<form>
<input type="button" onclick="setFloatLeft()" value="Set image to float left" />
</form>
</body>
</html>