text-stroke বৈশিষ্ট্য
text-stroke বৈশিষ্ট্যটি পাঠ্য অক্ষরের রূপরেখার রঙ এবং প্রস্থ বা এর আউটলাইন নির্দিষ্ট করে।
মান হিসাবে, আপনাকে বৈশিষ্ট্যে রূপরেখার প্রস্থ এবং একটি স্পেস দিয়ে রূপরেখার রঙ নির্দিষ্ট করতে হবে।
সিনট্যাক্স
সিলেক্টর {
text-stroke: রূপরেখার প্রস্থ এবং এর রঙ;
}
মৌলিক উদাহরণ
সাধারণ পাঠ্য রূপরেখা:
<div class="stroked-text">
Lorem ipsum dolor sit amet
</div>
.stroked-text {
font-size: 48px;
font-weight: bold;
-webkit-text-stroke: 2px red;
text-stroke: 2px red;
}
:
শুধুমাত্র রূপরেখা
এখন পাঠ্যের রঙটি ব্যাকগ্রাউন্ডের রঙের (আমাদের ক্ষেত্রে সাদা) সাথে মিলিয়ে দেওয়া যাক। ফলস্বরূপ, শুধুমাত্র রূপরেখাটি থাকবে:
<div class="stroked-text">
Lorem ipsum dolor sit amet
</div>
.stroked-text {
font-size: 48px;
font-weight: bold;
color: white;
-webkit-text-stroke: 2px black;
text-stroke: 2px black;
}
:
গ্রেডিয়েন্ট রূপরেখা
background-clip বৈশিষ্ট্য ব্যবহার করে একটি গ্রেডিয়েন্ট রূপরেখা তৈরি করা যাক:
<div class="gradient-stroke">
Lorem ipsum dolor sit amet
</div>
.gradient-stroke {
font-size: 42px;
font-weight: bold;
background: linear-gradient(to right, #ff8a00, #e52e71);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
-webkit-text-stroke: 1px #333;
text-stroke: 1px #333;
}
:
একাধিক রূপরেখা
text-shadow ব্যবহার করে ডবল রূপরেখার প্রভাব:
<div class="double-stroke">
Lorem ipsum dolor sit amet
</div>
.double-stroke {
font-size: 40px;
color: white;
-webkit-text-stroke: 3px #000;
text-stroke: 3px #000;
text-shadow:
0 0 5px #000,
0 0 10px #000;
}
:
অ্যানিমেটেড রূপরেখা
রূপরেখা পরিবর্তন করার অ্যানিমেশন যোগ করা যাক:
<div class="animated-stroke">
Lorem ipsum dolor sit amet
</div>
.animated-stroke {
font-size: 38px;
color: white;
-webkit-text-stroke: 1px #ff0000;
text-stroke: 1px #ff0000;
animation: pulse 2s infinite;
}
@keyframes pulse {
0% { -webkit-text-stroke: 1px #ff0000; text-stroke: 1px #ff0000; }
50% { -webkit-text-stroke: 3px #ff0000; text-stroke: 3px #ff0000; }
100% { -webkit-text-stroke: 1px #ff0000; text-stroke: 1px #ff0000; }
}
:
আরও দেখুন
-
text-fill-colorবৈশিষ্ট্য,
যা পাঠ্য অক্ষর পূরণ করার রঙ নির্দিষ্ট করে -
text-stroke-colorবৈশিষ্ট্য,
যা পাঠ্য রূপরেখার রঙ নির্দিষ্ট করে -
text-stroke-widthবৈশিষ্ট্য,
যা পাঠ্য রূপরেখার প্রস্থ নির্দিষ্ট করে