Bootstrap: Component “Badge”

Badges are similar to labels; the primary difference is that the corners are more rounded. Badges are mainly used to highlight new or unread items. Example:-

<h1>Example heading <span class=" badge-secondary">New</span></h1>

Contextual Badges:

Contextual classes use to change the color of a badge. Example:-

<span class="badge badge-primary">Primary</span>

Pill Badges:-

Use the .badge-pill class to make the badges more round. Example:-

<span class="badge badge-pill badge-primary">Primary</span>

Badge inside an Element(button):-

An example of using a badge inside a button.

<button type="button" class="btn btn-primary">
  create button <span class="badge badge-light">1</span>
</button>
Tagged : / / / / / / / / /

Bootstrap 4.4.0 Component “Alerts”

Alerts:-

Alerts are created with the .alert class, followed by one of the contextual classes .alert-success.alert-info.alert-warning.alert-danger.alert-primary.alert-secondary.alert-light or .alert-dark.

Syntax:-

<div class="alert alert -success">
<p> inside paragraph alert success component use </p>
</div>

Alert Links:-

Add the alert-link class to any links inside the alert box to create “matching colored links”.

syntax:-

<div class="alert alert-success">
  Alert link use <a href="#" class="alert-link">this is a link</a>.
</div>

Closing Alerts:-

To close the alert message, add a .alert-dismissible class to the alert container. for creating alert messages we have to create a button or link, inside button or link adds class=”close” and data-dismiss=”alert”.

syntax:-

<div class="alert alert-success alert-dismissible">
  <button type="button" class="close" data-dismiss="alert">&times;</button>
  this is a message.
</div>

Animated Alerts:-

The .fade and .show classes add a fading effect when closing the alert message.

this class is use to delete anything(text,div,message-box).

Syntax:-

<div class="alert alert-danger alert-dismissible fade show">
Tagged : / / / / / /

Advance PHP

In core PHP we learn only the basic elements but in advanced PHP we are learning many other elements or their uses in real-life projects that is why it is called advanced PHP. Remember that there is no difference between core PHP and advanced PHP.

why we should learn advanced php?

The good feature of PHP is that it is very robust and scalable. PHP is much the same as if it was an object-oriented language, making it a very easy language to deal with. PHP also has a very strong meta-language for programmers. PHP has increased demand for language development year over year.

Class & Object

Class:-

  • PHP class is a group of values and a set of operations to manipulate the value or to change the value.
  • Classes are the blueprints of objects.
  • Classes are nothing without objects.
  • Class is a programmer-defined data type.
  • The syntax for defining a class in PHP is very simple.
  • We use the keyword class followed by the name of the class.

Rules for creating class:-

  • Class name can be any valid label like(Vikash,Ram,Boss,Cat,Plant e.t.c).
  • Cannot be used Php reserved words.
  • The class name, should start with letter or underscore.
  • for remembering class, the class name starts with the first capital letter.

syntax:-

class Classname
{
var&variable_name;
var&variable_name;
var&variable_name;

function Method_name()
{
body of method;
}

function Method_name()
{
body of method;
}

function Method_name(parameter_list)
{
body of method;
}

}

Object:-

  • Objects are defined from classes.
  • An object of a class a copy of each variable defined in the class is created.
  • Classes are nothing without objects.
  • We can create multiple objects from a class.

Syntax:-

$Object_name=new class_name;
Tagged : / / / / / / / / / / /